mIRC Homepage
Posted By: jacksparrow2 kick on multiple chanel - 14/06/04 03:40 PM
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
Posted By: tsoglanos Re: kick on multiple chanel - 15/06/04 08:12 PM
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

Posted By: Zyzzyx26 Re: kick on multiple chanel - 15/06/04 08:35 PM
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.
Posted By: tidy_trax Re: kick on multiple chanel - 15/06/04 08:38 PM
Nope, he was right. smile
© mIRC Discussion Forums