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 for those learning Tcl or writing their own scripts.
topdawg_b
Voice
Posts: 32 Joined: Sun Dec 07, 2008 7:13 pm
Post
by topdawg_b » Sat Dec 20, 2008 12:44 am
everything works except the timer the timr does nothing and reports no error. I havent got a clue what i need to do to fix it.
Code: Select all
bind mode - "% -o" on_deop
proc on_deop { nick host hand chan mode target } {
global botnick banmask
set banmask [getchanhost $nick $chan]
if {$nick == $botnick} {return}
if {$target == $botnick} {
putserv "privmsg chanserv :ban $chan $nick 12Never 4De-op 12the bot!!!"
putserv "privmsg chanserv :op $chan $botnick"
utimer 10 {putquick "MODE $chan -b $banmask" }
}
}
speechles
Revered One
Posts: 1398 Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)
Post
by speechles » Sat Dec 20, 2008 11:02 am
Code: Select all
utimer 10 {putquick "MODE $chan -b $banmask" }
Your problem is the curly bracings. This disables variable substitution. So literally what you are doing is
putquick "MODE $chan -b $banmask" . $chan isn't converted to a channel name, $banmask isn't a ban mask. Instead try the code below:
Code: Select all
utimer 10 [list putquick "MODE $chan -b $banmask"]