<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/4139" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2003-04-14T14:14:18-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/4139</id>

		<entry>
		<author><name><![CDATA[GodOfSuicide]]></name></author>
		<updated>2003-04-14T14:14:18-04:00</updated>

		<published>2003-04-14T14:14:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=19075#p19075</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=19075#p19075"/>
		<title type="html"><![CDATA[/luser writing in HTML file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=19075#p19075"><![CDATA[
<a href="http://www.dawgtcl.com:81/" class="postlink">http://www.dawgtcl.com:81/</a><br><br>they got this TCL with HTML support<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1433">GodOfSuicide</a> — Mon Apr 14, 2003 2:14 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-04-14T12:15:09-04:00</updated>

		<published>2003-04-14T12:15:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=19071#p19071</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=19071#p19071"/>
		<title type="html"><![CDATA[/luser writing in HTML file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=19071#p19071"><![CDATA[
Original code by egghead can be found <a href="http://members.fortunecity.com/eggheadtcl/lusers.tcl.txt" class="postlink">here</a>.<div class="codebox"><p>Code: </p><pre><code>#---------------------------------------------------------------------# lusers.tcl# Tcl script for IRC bot eggdrop## Usage: !lusers# The bot will send a LUSERS request to the server and report the# result in the channel.## v0: 24-Oct-2002# v1: 26-Oct-2002# v2: 28-Oct-2002#---------------------------------------------------------------------package require eggdrop 1.6package require Tcl 8.0set htmlfile "lusers.html"bind pub o !lusers lusers:pubbind time - * lusers:timebind RAW - 251 lusers:rawbind RAW - 252 lusers:rawbind RAW - 253 lusers:rawbind RAW - 254 lusers:rawbind RAW - 255 lusers:raw#---------------------------------------------------------------------# Publicly triggered "LUSERS" request.#---------------------------------------------------------------------proc lusers:pub { nick uhost hand chan text } {   global lusersinfo   global lusersrawinfo   # use lowercase channel name only in the remainder.   set chantlw [string tolower $chan]   # if lusersinfo exists a lusers request is already pending.   if {[info exists lusersinfo]} {      # check if a request is already pending for that channel.      if {[lsearch -exact $lusersinfo $chantlw] == -1 } {         # add the channel to channels where bot will report.         lappend lusersinfo $chantlw      }      return 1   }   # Send with some delay a new lusers request.   utimer 5 {puthelp LUSERS}   lappend lusersinfo [unixtime] $chantlw   # putlog the request.   return 1}#---------------------------------------------------------------------# On a regular basis check the pending request.#---------------------------------------------------------------------proc lusers:time { min hour day month year } {   global lusersinfo   global lusersrawinfo   if {![info exists lusersinfo]} { return }   set timestamp [lindex $lusersinfo 0]   if {[expr [unixtime] - $timestamp] &lt; 120 } { return }   # request expired.   lusers:report}#---------------------------------------------------------------------# RAW results.#---------------------------------------------------------------------proc lusers:raw { server keyword text } {   global lusersinfo   global lusersrawinfo   # currently a lusers request pending?   if {![info exists lusersinfo]} { return 0 }   # numerics must be in 251-255 range   if {![string match {25[1-5]} $keyword]} { return 0 }   # remove the botnick from the result.   if {[scan $text "%s %\[^\n\]" botnick text ] != 2 } { return 0 }   # awkward...   regsub -all : $text "" text   # lappend the remaining text to the list.   lappend lusersrawinfo $text   # retrieve total amount of users from raw 251   if { $keyword == 251 } {      set scanrule {There are %d users and %d invisible}      if {[scan $text $scanrule vusers iusers] == 2 } {        set totalusers [expr $vusers + $iusers]        lappend lusersrawinfo "(total $totalusers users)"      }   }   # numeric 255 (last) reached?   if { $keyword != 255 } { return 0 }   lusers:report}#---------------------------------------------------------------------# On an expired request or a 255 RAW numeric, report results# and unset the lists lusersinfo and lusersrawinfo.#---------------------------------------------------------------------proc lusers:report { } {   global lusersinfo   global lusersrawinfo   global server   global htmlfile   # review the raw info.   if {![info exists lusersrawinfo]} {      set lusersrawinfo [list]   }   set line [join $lusersrawinfo ". "]   # if line is empty: something is wrong.   if { $line == "" } {       set line "Sorry, could not obtain lusers info."   }   # retrieve the name of the server   set scanrule {%[^:]:%s}   if {[scan $server $scanrule servername serverport] &lt; 1 } {      set servername "current server"   }   set date [ctime [unixtime]]   # set line "\002Lusers info on $servername ($date)\002: $line."   # spit out the line on all requestchannels.   # set channels [lrange $lusersinfo 1 end]   # foreach chan $channels {   #   if { ![botonchan $chan] } { continue }   #   puthelp "PRIVMSG $chan :$line"   # }   # write in the html file   set file [open $htmlfile w]    puts $file "$line"    catch {close $file}    unset lusersinfo   unset lusersrawinfo}putlog "Lusers version 2 + html loaded." </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon Apr 14, 2003 12:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-04-14T11:58:37-04:00</updated>

		<published>2003-04-14T11:58:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=19069#p19069</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=19069#p19069"/>
		<title type="html"><![CDATA[/luser writing in HTML file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=19069#p19069"><![CDATA[
Please search the forums, this has allready been answered in the past.<br><br>LUSERS is a IRC command, that has been around since the start of the IRC project. This doesn't just apply to UnrealIRCD.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Mon Apr 14, 2003 11:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-04-14T11:35:09-04:00</updated>

		<published>2003-04-14T11:35:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=19068#p19068</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=19068#p19068"/>
		<title type="html"><![CDATA[/luser writing in HTML file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=19068#p19068"><![CDATA[
Hi,<br><br>can someone pls write me an TCL Script which any 5 minutes write the /lusers's into a html file? (lusers is a Unreal IRCD command which give information about the current users online<br>example:<br>There are 80224 users and 78318 invisible on 47 servers<br>97 operator(s) online<br>37 unknown connection(s)<br>148766 channels formed<br>I have 5742 clients and 1 servers<br>)<p>Statistics: Posted by Guest — Mon Apr 14, 2003 11:35 am</p><hr />
]]></content>
	</entry>
	</feed>
