| View previous topic :: View next topic |
| Author |
Message |
kitsaras Voice
Joined: 02 Feb 2006 Posts: 29
|
Posted: Sat Feb 11, 2006 11:30 pm Post subject: is it possible ? |
|
|
im just wondering if is possible in this great script who make mr Sir_Fz to show and the server with the stats u
ex !stats
<bot> Server Up 0 days, 0:06:45 shadow.uk.eu.hellas.net
or
<bot> shadow.uk.eu.hellas.net Server Up 0 days, 0:06:45
somethink like this
thanks alot.
| 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
}
}
|
|
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sun Feb 12, 2006 11:07 am Post subject: |
|
|
use this show:statsu proc:
| Code: | proc show:statsu {from kw arg} {
global statsu
foreach {c v} [array get statsu] {
puthelp "privmsg $c :$from [string range $arg [expr {[string first : $arg]+2}] 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: Sun Feb 12, 2006 5:43 pm Post subject: |
|
|
thanks a lot Sir_Fz i need to make one change in code
| Code: |
proc show:statsu {from kw arg} {
global statsu
foreach {c v} [array get statsu] {
puthelp "privmsg $c :$from [string range $arg [expr {[string first : $arg]+2}] end]"
array unset statsu $c
}
}
|
resoults redemption.ix.us.dal.net erver Up 36 days, 17:13:33
| Code: |
proc show:statsu {from kw arg} {
global statsu
foreach {c v} [array get statsu] {
puthelp "privmsg $c :$from [string range $arg [expr {[string first : $arg]+1}] end]"
array unset statsu $c
}
}
|
resoults now redemption.ix.us.dal.net Server Up 36 days, 17:25:48
works fine thanks again Sir_Fz for the valiable help  |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sun Feb 12, 2006 7:46 pm Post subject: |
|
|
Ahh my bad, I meant
| Code: | proc show:statsu {from kw arg} {
global statsu
foreach {c v} [array get statsu] {
puthelp "privmsg $c :$from [join [lrange [split $arg] 2 end]]"
array unset statsu $c
}
} |
So the reply would look like
| Quote: | | redemption.ix.us.dal.net Up 36 days, 17:13:33 |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
kitsaras Voice
Joined: 02 Feb 2006 Posts: 29
|
Posted: Sun Feb 12, 2006 9:11 pm Post subject: |
|
|
thanks Sir_Fz it works
thanks again. |
|
| Back to top |
|
 |
|