mIRC Home    About    Download    Register    News    Help

Print Thread
improving channel joining script #155792 09/08/06 12:10 PM
Joined: Aug 2004
Posts: 237
L
LethPhaos Offline OP
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Aug 2004
Posts: 237
Code:
raw 396:& LethPhaos.users.quakenet.org is now your hidden host:{
  var %i = 0,%a
  while $readini($+(",$mircini,"),chanfolder,n $+ %i) {
    %a = $addtok(%a,$gettok($v1,1,44),44)
    if $numtok(%a,44) == 5 { join -n %a | var %a }
    inc %i
  }
  if %a { join -n %a }
}


I've been using this script for a long time, but now i'm on multiple servers and i only want it to join the channels which are for quakenet, atm it connects all channels in the list.

Thanx in advance for any help!

Re: improving channel joining script #155793 09/08/06 01:20 PM
Joined: Aug 2004
Posts: 237
L
LethPhaos Offline OP
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Aug 2004
Posts: 237
Code:
alias joinchans {
  var %c = 1
  while $read(file.txt,n,%c) {
    $+(.timer,join.,$cid,.,$v1) 1 $calc(%c * 2) join $v1
    inc %c
  }
} 


found this script here on the forum, posted not long ago (thx), i guess i can use this to solve the problem, anyway, i'd still like the solution of my question, to learn from wink

Thanx a lot!

Re: improving channel joining script #155794 09/08/06 02:21 PM
Joined: Aug 2004
Posts: 237
L
LethPhaos Offline OP
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Aug 2004
Posts: 237
I seem to be missing something, I edited above script to this:

Code:
alias joinchans {
  var %c = 1
  while $read($1,n,%c) {
    if ( $left($v1,1) != ; ) {
      $+(.timer,join.,$cid,.,$v1) 1 $calc(%c * 2) join -n $v1
    }
    inc %c
  }
}


, but it doesn't work.

Basically I just want to be able to skip channels that are commented out using ";".

The error I get is:

-
* /join: insufficient parameters
-

Edit: also the delay should be shorter, as you can see, in the script I was previously using there was no delay at all and it worked perfectly fine.

Thanks a lot for any help!

Re: improving channel joining script #155795 09/08/06 06:57 PM
Joined: Mar 2005
Posts: 420
X
xDaeMoN Offline
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
Instead of commenting the channels in the file, why not just remove them? :tongue: You could also remove the timer so there won't be any delay when joining channels.

If you still prefer the commented channels, try this

Code:
 alias joinchans {
  var %c = 1, %cc
  while $read(file.txt,n,%c) {
 %cc = $v1
     if ( $left(%cc,1) != ; ) join %cc
    inc %c
  }
}  


Not tested but should work


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
Re: improving channel joining script #155796 10/08/06 05:04 PM
Joined: Aug 2004
Posts: 237
L
LethPhaos Offline OP
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Aug 2004
Posts: 237
Works like a charm, thanx a lot ^^

Did change to /join -n %cc by the way, that's more usefull in my opinion.

And I want to use quotes because I want to remember the channels for later, I'm going to join them again later on.

Again, thanx a lot!