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.

a mimic tcl please

Old posts that have not been replied to for several years.
Locked
h
harry
Voice
Posts: 14
Joined: Tue Sep 09, 2003 9:06 pm

a mimic tcl please

Post by harry »

i need a script that will repeat everything a user says with this public command: !mimic <nick> ,then make it stop by: !nomimic <nick>
master specific

note it only is going to be used in a private channel
User avatar
CrazyCat
Revered One
Posts: 1286
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

Code: Select all

bind pub -|o "!mimic" mimic:start
bind pub -|o "!nomimic" mimic:stop

set channel "#your_chan"

proc mimic:start {nick uhost handle chan args} {
   global botnick channel victim
   if {$chan != [string tolower $channel]} {
      return 0
   }
   if {$args == ""} {
      return 0
   }
   if {[info exists victim]} {
      putserv "PRIVMSG $chan :I'm allready working"
      return 0
   }
   set victim $nick
   bind pubm - * mimic:repeat
}

proc mimic:stop {nick uhost handle chan args} {
   global botnick channel victim
   if {$chan != [string tolower $channel]} {
      return 0
   }
   if {$args == ""} {
      return 0
   }
   if {![info exists victim]} {
      putserv "PRIVMSG $chan :I'm noy working"
      return 0
   }
   unset victim
   unbind pubm - * mimic:repeat
}

proc mimic:repeat {nick uhost hand chan text} {
   global botnick victim channel
   if {$nick == $victim} {
      putserv "PRIVMSG $channel :$text"
   }
}
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

use [string tolower $chan] == [string tolower $channel] and same thing for matching $nick with victim.. incase of case-differences.
h
harry
Voice
Posts: 14
Joined: Tue Sep 09, 2003 9:06 pm

Post by harry »

thanks guys

but i cant seem to get it working it doesnt say there are any errors , so i dont know
Locked