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 

help wit a tcl modification ols

 
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 May 20, 2006 3:54 am    Post subject: help wit a tcl modification ols Reply with quote

i modify this tcl from bind pub to bind join and i wonder:


Code:
bind JOIN -  "*"  statsu
bind raw - 242 show:statsu

set statsuc 0

proc statsu {nick uhost hand chan} {
 global statsu statsuc
 if {$statsuc > 0} {
  puthelp "privmsg $chan :Already in progress"
  return 0
 }
 set servers {exampe.irc.net}
 foreach server $servers {
  incr statsuc
  if {![info exists statsu([set chan [string tolower $chan]]:$statsuc)]} {
   set statsu($chan:$statsuc) 0
   putserv "stats u $server"
  }
 }
}

proc show:statsu {from kw arg} {
 global statsu statsuc
 foreach {c v} [array get statsu] {
  puthelp "privmsg [lindex [split $c :] 0] :$from [join [lrange [split $arg] 1 end]]"
  array unset statsu $c
  incr statsuc -1
  break
 }
}


this bot is an ircop. can i put something like:

set channel "#chan1"

so when i join the specific channel "#chan1" shows the statsu ?
and now works fine but shows the statsu in all channel .
any help pls ?
thanks
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat May 20, 2006 7:08 am    Post subject: Reply with quote

Code:
bind JOIN -  "#channel *"  statsu

_________________
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: Sat May 20, 2006 9:31 am    Post subject: Reply with quote

Sir_Fz wrote:
Code:
bind JOIN -  "#channel *"  statsu


thanks a lot Sir_Fz i try it Smile
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