|
Joined: Jun 2004
Posts: 124
Vogon poet
|
OP
Vogon poet
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...
|
|
|
|
Joined: Dec 2002
Posts: 3,534
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,534 |
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
}
}
|
|
|
|
Joined: Aug 2004
Posts: 7,168
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,168 |
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 join $gettok($readini(mirc.ini,chanfolder,$ini(mirc.ini,chanfolder,%x)),1,44) to .timer 1 %x join $gettok($readini(mirc.ini,chanfolder,$ini(mirc.ini,chanfolder,%x)),1,44)
|
|
|
|
Joined: Jun 2004
Posts: 124
Vogon poet
|
OP
Vogon poet
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?
|
|
|
|
Joined: Jul 2006
Posts: 107
Vogon poet
|
Vogon poet
Joined: Jul 2006
Posts: 107 |
i have many channels in many servers... I don't. I have a grand total of 3 channels in my favorites list.  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 FolderNameon *: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!
|
|
|
|
Joined: Jun 2004
Posts: 124
Vogon poet
|
OP
Vogon poet
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...
|
|
|
|
Joined: Jun 2004
Posts: 124
Vogon poet
|
OP
Vogon poet
Joined: Jun 2004
Posts: 124 |
theres one problem... your code is having conflict with my 2 script... on *:start:nick $+(rnick][,$regsubex($str(.,$r(5,5)),/./g,$r(a,z)) 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.
|
|
|
|
Joined: Jul 2006
Posts: 107
Vogon poet
|
Vogon poet
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 foldernamealias 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 
|
|
|
|
|