|
|
Joined: Mar 2006
Posts: 50
Babel fish
|
OP
Babel fish
Joined: Mar 2006
Posts: 50 |
Hi I'm wondering why this script doesn't work.
on *:kick:#:{
if ($wildsite == $address($me,2)) { return }
if ($me == $nick) {
var %x = $ialchan($address($knick,2),#,0)
while (%x) {
if ($wildsite == $ibl(#,%x)) {
kick $chan $ialchan($address($knick,2),#,%x).nick You are banned
}
dec %x
}
}
} As soon as I kick someone and his banmask (*!*@host.com) is already banned, the script should kick all the other clones from nick (if they exist).
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
The problem is with your first if statement. When you kick someone, then $wildsite would return your address, which is checked in the first if statement, and when true does a return. Therefore, your second if statement (and the rest of the code) never gets touched.
Do you want this code to work only when you kick, or when anyone kicks? Do you want it to work if you are kicked?
|
|
|
|
Joined: Mar 2006
Posts: 50
Babel fish
|
OP
Babel fish
Joined: Mar 2006
Posts: 50 |
Hi RusselB
I actually want it to work only when I kick someone and it also shouldn't work if I get kicked.
|
|
|
|
Joined: Jul 2006
Posts: 242
Fjord artisan
|
Fjord artisan
Joined: Jul 2006
Posts: 242 |
Hi I have not tested this but this should work. or something along those lines
alias specialkick { who # VAR %i = 1 mode $1 +b $2 WHILE ($nick($$1,%i) != $null) { IF ($2 iswm $ial($nick($$1,%i))) && ($nick != $me) { kick $chan $nick($$1,%i) } INC %i } }
/specialkick (channel) (mask)
Last edited by HaleyJ; 16/08/06 07:28 PM.
Newbie
|
|
|
|
Joined: Mar 2006
Posts: 50
Babel fish
|
OP
Babel fish
Joined: Mar 2006
Posts: 50 |
Thx HaleyJ for the code. But isn't there another way not to use /who # ? I'm in a big channel and sometimes I kick 2 or 3 users at the same time. So if everytime I use /who # I'll get flooded. Btw. the script shouldn't ban the user as soon as he get kicked. I think you missunderstood sumth. It should only kick all the clones of the User, as soon as his banmask is already banned in the following format: e.g *!*@host.com ($address($nick,2))
|
|
|
|
Joined: Jul 2006
Posts: 242
Fjord artisan
|
Fjord artisan
Joined: Jul 2006
Posts: 242 |
Its needed to fill your IAL list up otherwise it may not work on some nicks, You can take out the who # and make another script that will who the channel whenever you join it.
ON *:JOIN:#: { if ($nick == $me) { who # } }
or use user levels to make that one line of code
ON +1000:JOIN:#: /who #
i am not sure on your last statement. Do you want to kick and not ban?
Newbie
|
|
|
|
Joined: Aug 2006
Posts: 5
Nutrimatic drinks dispenser
|
Nutrimatic drinks dispenser
Joined: Aug 2006
Posts: 5 |
I think he means he wants to kick them IF they are already banned.
Perhaps you could use the isban operator? Or maybe the On BAN event?
|
|
|
|
Joined: Mar 2006
Posts: 50
Babel fish
|
OP
Babel fish
Joined: Mar 2006
Posts: 50 |
@Haley I'm already using: ON *:JOIN:#: { if ($nick == $me) { who # } } @Ezdo 1. SHE! 2. u right ... it should kick the clones IF they're already banned. 3. Does there really exist a "isban" operator? I just thought it would also work like this: if ($address($knick,2) == $ibl(#,%i)) { kick the clones }
|
|
|
|
Joined: Jul 2006
Posts: 242
Fjord artisan
|
Fjord artisan
Joined: Jul 2006
Posts: 242 |
UNTESTED
alias specialkick { who # VAR %i = 1 WHILE ($nick($$1,%i) != $null) { if ($2 iswm $ibl(#,%i)) { kick $chan $nick($$1,%i) } INC %i } }
Newbie
|
|
|
|
Joined: Mar 2006
Posts: 50
Babel fish
|
OP
Babel fish
Joined: Mar 2006
Posts: 50 |
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Sorry I didn't post sooner, had trouble with my phone line and DSL service. Anyhow, I think this should work for what you're wanting on me:*:kick:#:{
if $knick != $me {
var %x = $ialchan($address($knick,2),#,0)
while (%x) {
if ($wildsite == $ibl(#,%x)) {
ban -k $chan $ialchan($address($knick,2),#,%x).nick You are banned
}
dec %x
}
}
}
|
|
|
|
Joined: Mar 2006
Posts: 50
Babel fish
|
OP
Babel fish
Joined: Mar 2006
Posts: 50 |
Thank you very much RusselB!
|
|
|
|
|
|