mIRC Home    About    Download    Register    News    Help

Print Thread
Kick/ban on request script... #101837 29/10/04 04:03 PM
Joined: Sep 2004
Posts: 17
_
_Patrik_ Offline OP
Pikka bird
OP Offline
Pikka bird
_
Joined: Sep 2004
Posts: 17
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)



*!*@help.me.if.you.can
Re: Kick/ban on request script... #101838 29/10/04 04:13 PM
Joined: Aug 2003
Posts: 314
S
Sigh Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2003
Posts: 314
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

Re: Kick/ban on request script... #101839 29/10/04 06:23 PM
Joined: Sep 2004
Posts: 17
_
_Patrik_ Offline OP
Pikka bird
OP Offline
Pikka bird
_
Joined: Sep 2004
Posts: 17
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..


*!*@help.me.if.you.can
Re: Kick/ban on request script... #101840 30/10/04 12:54 AM
Joined: Sep 2004
Posts: 200
I
IR_n00b Offline
Fjord artisan
Offline
Fjord artisan
I
Joined: Sep 2004
Posts: 200
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