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.
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
}
}