egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

is it possible ?

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
kitsaras
Voice


Joined: 02 Feb 2006
Posts: 29

PostPosted: Sat Feb 11, 2006 11:30 pm    Post subject: is it possible ? Reply with quote

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
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Feb 12, 2006 11:07 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
kitsaras
Voice


Joined: 02 Feb 2006
Posts: 29

PostPosted: Sun Feb 12, 2006 5:43 pm    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Feb 12, 2006 7:46 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
kitsaras
Voice


Joined: 02 Feb 2006
Posts: 29

PostPosted: Sun Feb 12, 2006 9:11 pm    Post subject: Reply with quote

thanks Sir_Fz it works Smile

thanks again.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber