This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

help wit a tcl modification ols

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
k
kitsaras
Voice
Posts: 29
Joined: Thu Feb 02, 2006 4:57 pm

help wit a tcl modification ols

Post by kitsaras »

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

Code: Select all

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
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

bind JOIN -  "#channel *"  statsu
k
kitsaras
Voice
Posts: 29
Joined: Thu Feb 02, 2006 4:57 pm

Post by kitsaras »

Sir_Fz wrote:

Code: Select all

bind JOIN -  "#channel *"  statsu
thanks a lot Sir_Fz i try it :)
Post Reply