how can I add it to the bot so I can type !gag from my other mirc so the bot can gag a certain person?
on @*:TEXT:$($+($strip(!gag),*)):#: {
if ($2 ison #) && ($3 isnum) && ($nick isop #) silence $2 $3
else { .msg $nick Type: !gag <nick> <time in minutes> }
}
alias silence {
describe # Hey $1, I think it's time for you to shut up. $&
You've been gaged for $2 minute(s).
if ($nick(#,$nick,+)) { mode # -v $$1 }
if ($nick(#,$nick,%)) { mode # -hv $$1 $1 }
if ($nick(#,$nick,@)) { mode # -ohv $str($$1 $+ $chr(32),3) }
if ($nick(#,$nick,&)) { mode # -aohv $str($$1 $+ $chr(32),4) }
mode # +b ~q: $+ $address($$1,2)
var %i = $calc($2 * 60) | .timer 1 %i charge.timer $$1
}
alias charge.timer {
mode # -b ~q: $+ $address($$1,2)
if ($(% $+ $address($$1,2) $+ shoot,2) == 4) { mode # +v $1 }
if ($(% $+ $address($$1,2) $+ shoot,2) == 3) { mode # +h $1 }
if ($(% $+ $address($$1,2) $+ shoot,2) == 2) { mode # +o $1 }
if ($(% $+ $address($$1,2) $+ shoot,2) == 1) { mode # +a $1 }
.describe # $1 ok, you can speak again. Now stop talking like an idiot.
}
Note: Make sure the client running the code and people who command the trigger !gag are opped in channel.