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.

rehash script

Help for those learning Tcl or writing their own scripts.
Post Reply
l
l.kleijn
Voice
Posts: 33
Joined: Sun May 18, 2014 10:02 am

rehash script

Post by l.kleijn »

Code: Select all

proc pub:rehash {nick host hand chan arg} {
  global botnick
  if {[channel get $chan cmd]} {
  if {[matchattr $hand n] == 0} {
     putserv "NOTICE $nick :You don't have access."
     return 0
  }
  putserv "NOTICE $nick :Rehash."
  rehash
  channel set $chan -cmd
  timer 1 channel set $chan +cmd
 }
}
I have this error: [08:39:03] Tcl error [pub:rehash]: wrong # args: should be "timer minutes command ?count?"

How can i fix this ?
Online
User avatar
CrazyCat
Revered One
Posts: 1305
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

Code: Select all

timer 1 [list channel set $chan +cmd]
l
l.kleijn
Voice
Posts: 33
Joined: Sun May 18, 2014 10:02 am

Post by l.kleijn »

Thanks it's working
Post Reply