mIRC Home    About    Download    Register    News    Help

Print Thread
channels join? #181750 30/07/07 02:48 PM
Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
anyone knows how to make a popup/script that in that script/popup all channels saved in the "mIRC Favorites"(where channels are listed) in just one click i can join them all... can that be possible.. i dont want to use the "join on connect" options...

Re: channels join? [Re: sigbin] #181751 30/07/07 03:36 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
menu channel {
  Join chans: chans
}

alias chans {
  var %x = 1
  while (%x <= $ini(mirc.ini,chanfolder,0)) {
    join $gettok($readini(mirc.ini,chanfolder,$ini(mirc.ini,chanfolder,%x)),1,44)
    inc %x
  }
}

Re: channels join? [Re: sigbin] #181773 30/07/07 10:11 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Please note that most, if not all, IRCd's have a limit as to the number of channels you can join. This limit is set in the IRCd configuration file.

Also, note that SladeKraven's code does not allow for a possible "Target change too fast" error. The easiest way to get around this, is to change
Code:
join $gettok($readini(mirc.ini,chanfolder,$ini(mirc.ini,chanfolder,%x)),1,44)
to
Code:
.timer 1 %x join $gettok($readini(mirc.ini,chanfolder,$ini(mirc.ini,chanfolder,%x)),1,44)


Re: channels join? [Re: RusselB] #181790 31/07/07 05:15 AM
Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
i have many channels in many servers... so how can i just join the channels in the server1 and join only the channels in server2?

Re: channels join? [Re: sigbin] #181825 31/07/07 06:42 PM
Joined: Jul 2006
Posts: 107
L
LonDart Offline
Vogon poet
Offline
Vogon poet
L
Joined: Jul 2006
Posts: 107
Originally Posted By: sigbin
i have many channels in many servers...

I don't. I have a grand total of 3 channels in my favorites list. shocked
Soooo, if this code needs to use scid/scon, I'm at a loss.

Anyway, my thought was to load the favorites in a hidden window, then filter it and use that for the joins.

I also thought when you said server, you meant network. Then I thought, heck maybe he does mean server.

If you really meant server, that would require that you organized your favorites using
the "Folder:" option to represent the servers.

So, we can filter the list by network, and/or by Folder.

I think this code would work if you only made one connection at a time, until all the channels were joined.
In any case, it ought to get you started.

; Usage: /joinfave FolderName

Code:
on *:START:grabfave

alias grabfave {
  window -hlp @Favorites
  set -su0 %fvct $ini(mirc.ini,chanfolder,0)
  while %fvct {
    aline @Favorites $readini(mirc.ini,chanfolder,$ini(mirc.ini,chanfolder,%fvct))
    dec %fvct
  }
}

alias joinfave {
  set %join.net $network
  set %join.foldr $1
  window -hlp @Netfave
  filter -cww @Favorites @Netfave $+(*,%join.net,*)
  filter -cww @Netfave @Netfave $+(*,%join.foldr,*)
  var %y = $filtered, %x = 1
  while ( %x <= %y ) {
    .timer 1 %x join $gettok($line(@Netfave,%x),1,44)
    inc %x
  }
  window -c @Netfave
  unset %join.*
}

I only 'tested' this with echo and my puny favorites list!


LonDart
Re: channels join? [Re: LonDart] #181846 01/08/07 12:17 AM
Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
that was just an example... i have 3 servers 1 channel in 2 servers then 9 channels in other server... i rarely join the 2 servers... i just want to excluse the channels in other server... XD thnakz for tha code...

Re: channels join? [Re: LonDart] #181848 01/08/07 12:36 AM
Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
theres one problem... your code is having conflict with my 2 script...

Code:
on *:start:nick $+(rnick][,$regsubex($str(.,$r(5,5)),/./g,$r(a,z))


Code:
on *:start:.timestamp -f [c]12—•mm/dd [HH:nn:ss]•


can you fix these 2 to it will go smoothly with our code? thankz

Last edited by sigbin; 01/08/07 12:37 AM.
Re: channels join? [Re: sigbin] #181867 01/08/07 10:27 AM
Joined: Jul 2006
Posts: 107
L
LonDart Offline
Vogon poet
Offline
Vogon poet
L
Joined: Jul 2006
Posts: 107
I'm not sure why there would be a conflict, except that you can only have one on *:start: per script file. BUT...
Since we're only talking about 9 channels, we can tighten up the script and do away with the on start altogether.

Usage would still be /joinfave foldername

Code:
alias joinfave {
  window -hlp @Favorites
  set -su0 %fvct $ini(mirc.ini,chanfolder,0)
  while %fvct {
    aline @Favorites $readini(mirc.ini,chanfolder,$ini(mirc.ini,chanfolder,%fvct))
    dec %fvct
  }
  set %join.net $network
  set %join.foldr $1
  filter -cww @Favorites @Favorites $+(*,%join.net,*)
  filter -cww @Favorites @Favorites $+(*,%join.foldr,*)
  var %y = $filtered, %x = 1
  while ( %x <= %y ) {
    .timer 1 %x join $gettok($line(@Favorites,%x),1,44)
    inc %x
  }
  window -c @Favorites
  unset %join.*
}

Also, I still suspect that by server you mean network, in which case we could do away with the foldername too.
In that case it would be very simple to put the joinfave onto a status window popup, and eliminate typing smile



LonDart