mIRC Home    About    Download    Register    News    Help

Print Thread
hop all? Help please! #167966 02/01/07 07:04 AM
Joined: Jan 2007
Posts: 31
P
piker Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Jan 2007
Posts: 31
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

Re: hop all? Help please! [Re: piker] #167968 02/01/07 07:30 AM
Joined: Apr 2006
Posts: 400
K
Kurdish_Assass1n Offline
Fjord artisan
Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
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.


-Kurdish_Assass1n
Re: hop all? Help please! [Re: Kurdish_Assass1n] #167969 02/01/07 07:57 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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.

Re: hop all? Help please! [Re: piker] #168010 02/01/07 05:45 PM
Joined: Oct 2006
Posts: 342
L
learn3r Offline
Fjord artisan
Offline
Fjord artisan
L
Joined: Oct 2006
Posts: 342
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
  }
}


learn learn learn