mIRC Homepage
Posted By: piker hop all? Help please! - 02/01/07 07:04 AM
I have created a nice set of schemes for mirc etc but sometimes the nicklist (picwin based) doesnt pick up the fresh settings so a /hop is required, this happens in all the rooms so I'm after a way to make mirc hop them all all at once

or to remember the rooms I'm currently in so that i can /partall
then join %var-containing-rooms? shocked

any experts who could give me a hand it's highly apreciated laugh
Posted By: Kurdish_Assass1n Re: hop all? Help please! - 02/01/07 07:30 AM
I've haven't tested this, I'm making the script straight from here, so, try this:
Code:
alias hopall {
  var %chan.num $chan(0)
  var %i 1
  while (%chan.num >= %i) {
    hop $chan(%i)
  }
}

and I'm not understanding the second part, please try the script to see if it works, and, try and explain the second part a little better.
Posted By: RusselB Re: hop all? Help please! - 02/01/07 07:57 AM
You forgot to increment the variable
Code:
alias hopall {
  var %chan.num = $chan(0), %i = 1
  while %i <= %chan.num {
    hop -c $chan(%i)
    inc %i
  }
}


Being able to remember what rooms you're in so that you can use /partall and then re-join is a poor way of doing this, since the information would be best stored in a variable, and, therefore, is limited by the 900 (or so) character limit for variables.

I would not recommend using that method.
Posted By: learn3r Re: hop all? Help please! - 02/01/07 05:45 PM
Code:
alias hopall {
  var %sn = 1, %sc = 1
  if ($1 == -a) {
    if (($status == connected) && ($chan(0) != 0)) {
      while (%sc <= $chan(0)) {
        var %c = %c $+ $chan(%sc) $+ $chr(44)
        inc %sc
      }
      .partall $2- | join %c
    }
  }
  else {
    while (%sn <= $scon(0)) {
      .scon %sn
      if (($status == connected) && ($chan(0) != 0)) {
        while (%sc <= $chan(0)) {
          var %c = %c $+ $chan(%sc) $+ $chr(44)
          inc %sc
        }
        var %exc = %exc .scon %sn join %c $chr(124), %sc = 1, %c
        .partall $1- 
      }
      inc %sn
    }
    %exc
  }
}
© mIRC Discussion Forums