mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
OP Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
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)?

Code:
/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,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
If the user isn't an avoice then %mode.nix isn't getting decreased and you loop forever. Ctrl+break worked for me.

Joined: Apr 2004
Posts: 45
V
Ameglian cow
Offline
Ameglian cow
V
Joined: Apr 2004
Posts: 45
yep:

Code:
/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,541
L
Hoopy frood
OP Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
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,541
L
Hoopy frood
OP Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
Ok, now, how would I change:

Code:
/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,541
L
Hoopy frood
OP Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
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,541
L
Hoopy frood
OP Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
Ok, here's what I did (in case anybody else was wondering):

Code:
/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

Link Copied to Clipboard