mIRC Home    About    Download    Register    News    Help

Print Thread
kick on multiple chanel #86871 14/06/04 03:40 PM
Joined: Oct 2003
Posts: 306
J
jacksparrow2 Offline OP
Fjord artisan
OP Offline
Fjord artisan
J
Joined: Oct 2003
Posts: 306
i have this a kicker for two channels

alias kb {
if ($2 == 1) {
if ($me !isop #) { echo -ag OpControl no sos Op/Half op | return }
elseif ($1 isop #) || ($1 ishop #) { echo -ag OpControl Es un Operador/Half op | return }
else { inc %kickc | ban -ku120 # $1 9 $3- %kickc | halt }
}
elseif ($2 > 1) {
var %i = $2
while %i {
if (!$comchan($1,%i)) { halt }
echo $comchan($1,%i) 0,4 caca
ban -ku120 $comchan($1,%i) $1 9 $3-
dec %i
}
}
}

i use /kb nick 2 reason

the 2 means the nick are in two chanells
please help to fix it

thnx


mess with the best
Re: kick on multiple chanel #86872 15/06/04 08:12 PM
Joined: Mar 2004
Posts: 130
T
tsoglanos Offline
Vogon poet
Offline
Vogon poet
T
Joined: Mar 2004
Posts: 130
alias kb { var %d = 1 | while ($comchan($1,%d)) { if ($comchan($1,%d).op) ban -ku120 $comchan($1,%d) $1 $2 $3- | inc %d } }

here is an explain how the script work
$comchan(nickname,0) returns the channel you and nick both are on

$comchan(nickname,1) returns the first channel you and nick both are on

$comchan(nickname,1).op returns $true if you're an op on the channel

if you type /kb nick 2 reason
$1 is the nickname
$2 the bantype
and
$3- the reason


Re: kick on multiple chanel #86873 15/06/04 08:35 PM
Joined: Feb 2004
Posts: 714
Z
Zyzzyx26 Offline
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
The number 1 and 2 (or any other) in this alias doens't refer to the banmask, but to the number of channels that he wants to kick the $nick from, as far as i understood.

That way, the %d should be set as the $2, and not as the $comchan($1,0), since it is the one that defines how many channels the person is going to be kicked from.

Last edited by Zyzzyx26; 15/06/04 08:36 PM.

"All we are saying is give peace a chance" -- John Lennon
Re: kick on multiple chanel #86874 15/06/04 08:38 PM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Nope, he was right. smile


New username: hixxy