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
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"
}
}