mIRC Homepage
Posted By: jacksparrow2 comchan - 20/08/04 04:02 PM
alias kicke {
set %canal $comchan($1,%i)
.inc %i | .echo -a %canal %i | if %i > 4 return
}

i made this for kick one person in many chanels but i have a problem , kicks the nick in one channel only ?

any help?
Posted By: Coolkill Re: comchan - 20/08/04 04:17 PM
That is because your missing a while loop.

alias kicke {
var %i = $comchan($1,0)
while (%i) {
if ($me isop $comchan($1,%i)) { kick $v2 $1 $2- }
dec %i
}
}

/kicke nickname reason.

Edit; Also if you want to ban as well as kick, replace;
if ($me isop $comchan($1,%i)) { kick $v2 $1 $2- }
With;

if ($me isop $comchan($1,%i)) { ban -k $v2 $1 2 $2- }


Eamonn.
Posted By: tsoglanos Re: comchan - 20/08/04 08:02 PM
Code:
 
replace: if ($me isop $comchan($1,%i)) 
 with if ($comchan($1,%i).op)
 
Posted By: jacksparrow2 Re: comchan - 20/08/04 08:12 PM
thnx so much pal
Posted By: Coolkill Re: comchan - 20/08/04 08:12 PM
Theres nothing wrong with the coding it just so happens to be an "alternative".

Just like,

if (a > b) and if (b < a) are the same thing.

Eamonn.
Posted By: tsoglanos Re: comchan - 20/08/04 08:26 PM
dont take it personal if ($me isop $comchan($1,%ok)) is longer then:
if $comchan($1,%ok).op

This was just an info ,. cya
© mIRC Discussion Forums