mIRC Home    About    Download    Register    News    Help

Print Thread
Auto voicing script help needed #91920 27/07/04 04:59 PM
Joined: Dec 2002
Posts: 1,527
L
landonsandor Offline OP
Hoopy frood
OP Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,527
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
Re: Auto voicing script help needed #91921 27/07/04 05:08 PM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
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.

Re: Auto voicing script help needed #91922 27/07/04 07:06 PM
Joined: Apr 2004
Posts: 45
V
Venoman Offline
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

Re: Auto voicing script help needed #91923 28/07/04 03:43 AM
Joined: Dec 2002
Posts: 1,527
L
landonsandor Offline OP
Hoopy frood
OP Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,527
DUH!! *smack* I knew it was something stupid. Venoman, I'll try that out thanks


Those who fail history are doomed to repeat it
Re: Auto voicing script help needed #91924 01/08/04 03:58 AM
Joined: Dec 2002
Posts: 1,527
L
landonsandor Offline OP
Hoopy frood
OP Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,527
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
Re: Auto voicing script help needed #91925 25/10/04 04:24 PM
Joined: Dec 2002
Posts: 1,527
L
landonsandor Offline OP
Hoopy frood
OP Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,527
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
Re: Auto voicing script help needed #91926 20/11/04 09:19 AM
Joined: Dec 2002
Posts: 1,527
L
landonsandor Offline OP
Hoopy frood
OP Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,527
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