|
Joined: Dec 2002
Posts: 1,536
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2002
Posts: 1,536 |
Ok, can somebody tell me why this lockls up my mirc into an unlockable state (CTRL + Pause/break does NOT unlock mirc - I gotta task manager it)?
/moding {
var %mode.nix = $nick(#,0,r)
while (%mode.nix > 0) {
if ($address($nick(#,%mode.nix,r),9) isavoice #) {
echa $address($nick(#,%mode.nix,r),9)
;mode # +v $nick(#,%mode.nix,r)
dec %mode.nix
}
}
}
the echa alias is a custom echoing alias that works perfectly and has for years so I KNOW that's not it. Also, the mode # +v is remmed out because I want to make sure it works BEFORE I do the mass voicing in case it doesnt work and voices everybody or something.
Those who fail history are doomed to repeat it
|
|
|
|
Joined: Dec 2002
Posts: 3,015
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,015 |
If the user isn't an avoice then %mode.nix isn't getting decreased and you loop forever. Ctrl+break worked for me.
|
|
|
|
Venoman
|
Venoman
|
yep:
/moding {
var %mode.nix = $nick(#,0,r)
while (%mode.nix > 0) {
if ($address($nick(#,%mode.nix,r),9) isavoice #) {
echa $address($nick(#,%mode.nix,r),9)
;mode # +v $nick(#,%mode.nix,r)
}
dec %mode.nix
}
}
try that. -Venoman
|
|
|
|
Joined: Dec 2002
Posts: 1,536
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2002
Posts: 1,536 |
DUH!! *smack* I knew it was something stupid. Venoman, I'll try that out thanks
Those who fail history are doomed to repeat it
|
|
|
|
Joined: Dec 2002
Posts: 1,536
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2002
Posts: 1,536 |
Ok, now, how would I change:
/moding {
var %mode.nix = $nick(#,0,r)
while (%mode.nix > 0) {
if ($address($nick(#,%mode.nix,r),9) isavoice #) { mode # +v $nick(#,%mode.nix,r) }
dec %mode.nix
}
} to use the $modespl so that I dont send a ton of /mode # commands?
Those who fail history are doomed to repeat it
|
|
|
|
Joined: Dec 2002
Posts: 1,536
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2002
Posts: 1,536 |
Can anybody help me with taking the above alias and use $modespl to cut down on the mode commands so I dont flood the server?
Those who fail history are doomed to repeat it
|
|
|
|
Joined: Dec 2002
Posts: 1,536
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2002
Posts: 1,536 |
Ok, here's what I did (in case anybody else was wondering): /moding {
var %mode.nix = $nick(#,0,r)
while (%mode.nix > 0) {
if ($address($nick(#,%mode.nix,r),9) isavoice #) { var %llcc.m-voice = %llcc.m-voice $nick(#,%mode.nix,r) }
dec %mode.nix
}
:1
if (%llcc.m-voice) { //mode # $+(+,$str(v,$modespl)) $gettok(%llcc.m-voice,1- $modespl,32) | //var %llcc.m-voice = $deltok(%llcc.m-voice,1- $modespl,32) | goto 1 }
}
Those who fail history are doomed to repeat it
|
|
|
|
|