mIRC Home    About    Download    Register    News    Help

Print Thread
comchan #94917 20/08/04 04:02 PM
Joined: Oct 2003
Posts: 306
J
jacksparrow2 Offline OP
Fjord artisan
OP Offline
Fjord artisan
J
Joined: Oct 2003
Posts: 306
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?


mess with the best
Re: comchan #94918 20/08/04 04:17 PM
Joined: Dec 2002
Posts: 788
C
Coolkill Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
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.

Re: comchan #94919 20/08/04 08:02 PM
Joined: Mar 2004
Posts: 130
T
tsoglanos Offline
Vogon poet
Offline
Vogon poet
T
Joined: Mar 2004
Posts: 130
Code:
 
replace: if ($me isop $comchan($1,%i)) 
 with if ($comchan($1,%i).op)
 

Re: comchan #94920 20/08/04 08:12 PM
Joined: Oct 2003
Posts: 306
J
jacksparrow2 Offline OP
Fjord artisan
OP Offline
Fjord artisan
J
Joined: Oct 2003
Posts: 306
thnx so much pal


mess with the best
Re: comchan #94921 20/08/04 08:12 PM
Joined: Dec 2002
Posts: 788
C
Coolkill Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
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.

Re: comchan #94922 20/08/04 08:26 PM
Joined: Mar 2004
Posts: 130
T
tsoglanos Offline
Vogon poet
Offline
Vogon poet
T
Joined: Mar 2004
Posts: 130
dont take it personal if ($me isop $comchan($1,%ok)) is longer then:
if $comchan($1,%ok).op

This was just an info ,. cya