mIRC Homepage
Posted By: landonsandor Auto voicing script help needed - 27/07/04 04:59 PM
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.
Posted By: Collective Re: Auto voicing script help needed - 27/07/04 05:08 PM
If the user isn't an avoice then %mode.nix isn't getting decreased and you loop forever. Ctrl+break worked for me.
Posted By: Venoman Re: Auto voicing script help needed - 27/07/04 07:06 PM
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
Posted By: landonsandor Re: Auto voicing script help needed - 28/07/04 03:43 AM
DUH!! *smack* I knew it was something stupid. Venoman, I'll try that out thanks
Posted By: landonsandor Re: Auto voicing script help needed - 01/08/04 03:58 AM
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?
Posted By: landonsandor Re: Auto voicing script help needed - 25/10/04 04:24 PM
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?
Posted By: landonsandor Re: Auto voicing script help needed - 20/11/04 09:19 AM
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 }
}
© mIRC Discussion Forums