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.
Old posts that have not been replied to for several years.
-
caesar
- Mint Rubber
- Posts: 3778
- Joined: Sun Oct 14, 2001 8:00 pm
- Location: Mint Factory
Post
by caesar »
Code: Select all
# binds
bind pubm - * smart:repeat
#flag
setudef flag repeat
# repeat
proc smart:repeat {nick uhost hand channel args} {
if {![chanflag $channel repeat] || ![botisop $channel]} { return 0 }
if {![info exists repeat($uhost:$channel)]} { set repeat($uhost:$channel) 0 }
# utimer 30 "array unset repeat $uhost:$channel"
if {$repeat($uhost:$channel) == "3"} {
putserv "PRIVMSG $channel :repeated 3 times"
}
}
And I don't see any array called 'repeat' when a I do a '.tcl array get repeat'. Why?
Ps: And yes, channel has +repeat..
Once the game is over, the king and the pawn go back in the same box.
-
ppslim
- Revered One
- Posts: 3914
- Joined: Sun Sep 23, 2001 8:00 pm
- Location: Liverpool, England
Post
by ppslim »
You need to make the array/variable name global.
Wihtout it, it remains only local.
-
caesar
- Mint Rubber
- Posts: 3778
- Joined: Sun Oct 14, 2001 8:00 pm
- Location: Mint Factory
Post
by caesar »
Oh, yah, you are right. Forgot to add a 'global repeat'. Thanks!

Once the game is over, the king and the pawn go back in the same box.