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.

utimer problems

Help for those learning Tcl or writing their own scripts.
Post Reply
t
topdawg_b
Voice
Posts: 32
Joined: Sun Dec 07, 2008 7:13 pm

utimer problems

Post by topdawg_b »

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" }
}
}
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Re: utimer problems

Post by speechles »

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"]
t
topdawg_b
Voice
Posts: 32
Joined: Sun Dec 07, 2008 7:13 pm

Post by topdawg_b »

thank you
Post Reply