|
Joined: Apr 2003
Posts: 29
Ameglian cow
|
OP
Ameglian cow
Joined: Apr 2003
Posts: 29 |
alias opx { if (# ischan) && (#) { set %x 1 :hehe .set %xen $nick(#,%x) if ($level($address(%xen,1)) == x) .mode # +ooo %xen inc %x goto hehe | halt else { halt } } } i dont know but mirc get screwed and i must restart mirc! Anyone help me?
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
alias opx { if ($chr(35) isin $active) { /set -u0 %x 1 while (%i <= $nick($active, 0)) { if ($nick !isop $active) && ($level($address($nick($active, %l), 5)) == x) { /set -u0 %opnick %opnick $nick($active, %l) } if ($numtok(%opnicks, 32) == $modespl) || (%i == $nick($active, 0)) { /mode $active $+(+,$str(o, $modespl)) %opnick /unset %opnick } /inc -u0 %i } } }
The reason yours didn't work was it was in an infinate loop. There was no condition to make it exit. You just had it keep going back to hehe. This should work much better
-KingTomato
|
|
|
|
Joined: Apr 2003
Posts: 29
Ameglian cow
|
OP
Ameglian cow
Joined: Apr 2003
Posts: 29 |
thnx!!
|
|
|
|
Joined: Apr 2003
Posts: 29
Ameglian cow
|
OP
Ameglian cow
Joined: Apr 2003
Posts: 29 |
Weird , nothing happens , no error or something , and i dont op anyone
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
alias opx { if ($chr(35) isin $active) { .set %x 1 } while (%x <= $nick($chan,0)) { if ($nick($active,%x) !isop $active) && ($level($address($nick($active,%x),1)) == x) { mode $active +o $nick($chan,%x) } inc %x } } } its quite slow  but it worked for me 
Last edited by pheonix; 27/05/03 11:24 PM.
new username: tidy_trax
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
my mistake, i initalized %x not %i at the beginning
alias opx { if ($chr(35) isin $active) { /set -u0 %i 1 while (%i <= $nick($active, 0)) { if ($nick !isop $active) && ($level($address($nick($active, %i), 5)) == x) { /set -u0 %opnick %opnick $nick($active, %i) } if ($numtok(%opnicks, 32) == $modespl) || (%i == $nick($active, 0)) { /mode $active $+(+,$str(o, $modespl)) %opnick /unset %opnick } /inc -u0 %i } } }
See if that doesn't help
-KingTomato
|
|
|
|
Joined: Dec 2002
Posts: 699
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 699 |
alias opx {
if $me isop # {
var %i = 1,%a,%b
while $nick(#,%i) {
%b = $ifmatch
if %b !isop # && $level($ial(%b)) == x { %a = %a %b }
inc %i
if $numtok(%a,32) == $modespl || !$nick(#,%i) { mode # + $+ $$str(o,$numtok(%a,32)) %a | var %a }
}
}
}
|
|
|
|
Joined: Apr 2003
Posts: 29
Ameglian cow
|
OP
Ameglian cow
Joined: Apr 2003
Posts: 29 |
 THANX!
|
|
|
|
|