mIRC Homepage
Posted By: _Patrik_ Kick/ban on request script... - 29/10/04 04:03 PM
Hello!

Im looking for a script that kick/bans automatically on a channel operator´s request! for example: If
a channel op triggers the kick/ban event then I will respond to it by kick/ban the person that the channel operator wants to get rid off automatically..

I know that it´s possible to make a script like that, here´s an example:

* Mandy was kicked by ^A^r^i^e^ (FiLTer Kicking *!* @ip* Banned By : advpsy)

Posted By: Sigh Re: Kick/ban on request script... - 29/10/04 04:13 PM
You could do this with a small loop in a ban event:

on @*:ban:#:{
var %i = 1
while ($ialchan($banmask,#,%i).nick) {
kick # $ifmatch Banned by $nick
inc %i
}
}

Some networks, namely Dalnet, allow you to kick multiple users in a single kick command which you can use to your advantage in this case:

on @*:ban:#:{
var %i = 1,%k
while ($ialchan($banmask,#,%i).nick) {
%k = $addtok(%k,$ifmatch,44)
if (4 // %i) {
kick # %k Banned by $nick
%k =
}
inc %i
}
kick # $$(%k) Banned by $nick
}

The 4 in if (4 // represents the number of nicknames it will attempt to send in a kick command
Posted By: _Patrik_ Re: Kick/ban on request script... - 29/10/04 06:23 PM
on @*:ban:#:{
var %i = 1
while ($ialchan($banmask,#,%i).nick) {
kick # $ifmatch Banned by $nick
inc %i
}
}

This snippet works fine, the thing is that its not working if a channel op kicks someone out of the channel, it works only on a ban.

can you please make it so it also will react on a kick event..
Posted By: IR_n00b Re: Kick/ban on request script... - 30/10/04 12:54 AM
heres 1 u can use
on *:text:*:#: {
if ($1 == !kb) {
if ($nick isop $chan) || ($nick ishop $chan) {
if ($$2 == $me) {
notice $nick no.
halt
}
mode $chan +b $address($$2,2)
kick # $$2 Banned by $nick $+ .
}
if ($nick !isop $chan) && ($nick !ishop $chan) {
notice $nick You need to be a op/halfop to use this command.
}
}
}
hope that helped, if an op/halfop says !kb (nick) you will kick and ban (nick) while having the ban in a *!*@host.net format
wink
© mIRC Discussion Forums