egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Action repeat errors occured...

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Sydneybabe
Op


Joined: 27 Apr 2007
Posts: 106
Location: Philippines

PostPosted: Sat Jun 30, 2012 1:36 pm    Post subject: Action repeat errors occured... Reply with quote

Hi, need help with this it gives me an error on partyline:
Quote:
[23:39:42] Tcl error [ctcp_repeat]: invalid command name "ctcp_repeat"

Code:
set repeat_msg {
   "Kick message 1"
   "Kick message 2"
}
set repeat_time 0
set repeat_chans "#"

bind pubm - * pubm_repeat
bind ctcp - ACTION ctcp_repeat

proc pubm_repeat {nick uhost hand chan arg} {
   global repeat_msg repeat_time repeat_chans repeat_data botnick
   if {(([lsearch -exact [string tolower $repeat_chans] [string tolower $chan]] != -1) && ($repeat_chans == "*")) && (![isop $nick $chan]) && (![isvoice $nick $chan]) && ($nick != $botnick)} {
      if {([info exists repeat_data($nick-$chan)]) && ($repeat_data($nick-$chan) == $arg)} {
         set banmask "*!*@[lindex [split $uhost @] 1]"
         set kickmsg [lindex $repeat_msg [rand [llength $repeat_msg]]]
         newchanban $chan $banmask $nick $kickmsg
         unset repeat_data($nick-$chan)
      } else {
         set repeat_data($nick-$chan) $arg
         utimer $repeat_time "catch {unset repeat_data([xsplit $nick-$chan])} 180"
      }
   }
}

proc ctcp_repeat {nick uhost hand chan keyword arg} {
   pubm_repeat $nick $uhost $hand $chan $arg
}
proc xsplit {arg} {
   regsub -all "\\\[" $arg "\\\[" arg
   regsub -all "\\\]" $arg "\\\]" arg
   return $arg
}


Thanks in advance.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber