| View previous topic :: View next topic |
| Author |
Message |
kitsaras Voice
Joined: 02 Feb 2006 Posts: 29
|
Posted: Thu Feb 09, 2006 9:54 pm Post subject: anyone can do this script for me ? |
|
|
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. |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Thu Feb 09, 2006 10:44 pm Post subject: |
|
|
The reply of stats u is numeric 242 on DALnet.
| Code: | 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
}
} |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
kitsaras Voice
Joined: 02 Feb 2006 Posts: 29
|
Posted: Fri Feb 10, 2006 2:55 am Post subject: |
|
|
thanks a lot Sir_Fz works perfect  |
|
| Back to top |
|
 |
|