mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Sep 2004
Posts: 17
_
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
Joined: Aug 2003
Posts: 314
S
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

Joined: Sep 2004
Posts: 17
_
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
Joined: Sep 2004
Posts: 200
I
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


Link Copied to Clipboard