mIRC Home    About    Download    Register    News    Help

Print Thread
#130956 23/09/05 11:35 PM
Joined: Jun 2005
Posts: 127
H
HAMM3R Offline OP
Vogon poet
OP Offline
Vogon poet
H
Joined: Jun 2005
Posts: 127
Code:
alias massmode {
  if ($1 == +v) {
    var %x = r,%w = v
    goto start
  }
  else {
    var %x = $remove($1,-,+),%w = %x
    goto start
  }
  :start
  if ($nick($active,0,%x) >= 20) { echo -a Too many users meet the criteria | halt }
  var %i = 1, %n 
  while (%i <= $nick($active,0,%x)) { 
    if ($nick($active,%i,%x) != $me) { 
      var %n = %n $nick($active,%i,%x)
    }
    inc %i
  } 
  mode $chan $left($1,1) $+ $str(%w,%i) %n
  if ($left($1,1) == -) {
    if ($nick($active,0,%x) != 0)  {
      massmode $1
    }
  }
  if ($left($1,1) == +) {
    if ($nick($active,0,%x) != %i)  {
      massmode $1
    }
  }
}

When all the modes cant be set at once, insted of repeating the command like I need it to,I recieve an "unknown command: massmode". Any ideas? Btw: I am a bit tired, so I'm sure it could have been formatted better using && insted of 2 lines, but I didnt realize that untill now. blush

Austin

Last edited by HAMM3R; 24/09/05 12:07 AM.

-- HAMM3R (aka: alhammer)
http://www.HAMM3R.net
#130957 23/09/05 11:43 PM
Joined: Jun 2005
Posts: 127
H
HAMM3R Offline OP
Vogon poet
OP Offline
Vogon poet
H
Joined: Jun 2005
Posts: 127
Ugg. Im reading over this thing and finding quite a few errors. I was confident it was straight before I posted it, but apparently not. crazy However I still cant get it to function the way i described in my first post.


-- HAMM3R (aka: alhammer)
http://www.HAMM3R.net
#130958 24/09/05 11:28 AM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
Recursion inside an alias is disabled in mIRC.
alias blah {
blah
}

=> won't work, mIRC will either take the built-in mIRc command or send it to the server. Makes it easier for custom msg or me scripts and prevents the beginner infinite recursion problems...

Solutions:
-> don't recurse
-> .timer 1 0 blah
-> copy the entire alias to a new alias blah2 and make it call the other, this gives the 'normal' recursion behaviour up untill 400 calls deep or so, then it fails.
-> probably something with signals works too


Link Copied to Clipboard