This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

anyone can do this script for me ?

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
k
kitsaras
Voice
Posts: 29
Joined: Thu Feb 02, 2006 4:57 pm

anyone can do this script for me ?

Post by kitsaras »

hello. i need a tcl script to display my ircd uptime in the active channel with a public command.

ex

!statsu
<bot> Server Up 29 days, 15:41:09

thank u.
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

The reply of stats u is numeric 242 on DALnet.

Code: Select all

bind pub - !statsu statsu
bind raw - 242 show:statsu

proc statsu {nick uhost hand chan arg} {
 global statsu
 if {![info exists statsu([set chan [string tolower $chan]])]} {
  set statsu($chan) 0
  putserv "stats u"
 }
}

proc show:statsu {from kw arg} {
 global statsu
 foreach {c v} [array get statsu] {
  puthelp "privmsg $c :[string range $arg [expr {[string first : $arg]+1}] end]"
  array unset statsu $c
 }
}
k
kitsaras
Voice
Posts: 29
Joined: Thu Feb 02, 2006 4:57 pm

Post by kitsaras »

thanks a lot Sir_Fz works perfect :D
Post Reply