mIRC Homepage
Heya,

I'm thinking if there might be a chance that you guys can implement an option that on exiting mIRC, it'll save all the chans/servers and on opening it back again, it connects to all the chans/servs that I've been connected to rather than connecting to servers one by one.

Kind just like FireFox when you close it with more than a tab.

P.S. I did a little google but I couldn't find scripts/help. Perhaps I was using wrong/not enough keywords, but oh well.
P.P.S If there was already an option like that, then pardon me and please point out where it's. xD

Cheers,
Sean.
If you always want the same networks/channels, it's very easy to script. If you want it to keep track of the last ones used, then it's still pretty easy, but does require keeping track of what's open. If you give specifics of how you want it to work, someone could easily set up a script for you.

Note that I'm not saying the feature suggestion isn't good. It's not a bad idea at all. I'm just answering your questions at the end about whether or not there is a script method.
I haven't had time to test this, but you could just use this for now.

Code:
#autocon on
alias -l loc { return $iif($network,$v1,$gettok($server,-2-,46)) }
on *:connect:{
  if (!$istok(%servers,$server,44)) { set %servers $server $+ , $+ %servers }
  if ( % [ $+ [ $loc ] $+ ] .chans ) { join -n $v1 }
}
on *:join:#:{ set % [ $+ [ $loc ] $+ ] .chans $chan $+ , $+ % [ $+ [ $loc ] $+ ] .chans }
on *:start:{ tokenize 44 %servers | server $1 | tokenize 32 $2- | scon -r server -mz $* }
#autocon end
@Riamus2:
I completely agree with you. So now I know that it's easy to script, I have to learn whatever mIRC scripting is, I have no problem in learning and gaining any further experience but though I'd like to see that the option is considered in the next mIRC version since Khaled is trying his best to do it user-friendly as much as possible (he's doing an awesome job).

I think with that option it'll keep IRC users sticked to mIRC much more since I know that the human-being is utter bored by repetitive tasks.

@Jigsy:
I've tried it. It works but it only joins 1 channel only. I tried to see the log in the server's window, here what it says
Quote:
%GTANet.chans No such channel


I've also tried closing mIRC with 2 servers + channels joined in both of them, when I restart, it connects to both servers automatically and only joins 1 channel with an error in servers' windows like the following
Quote:
%<server-name>.chans No such channel


Thanks for doing the script, it gave me a head-up on creating a similar script once I learn mIRC script.
This is what I use:

Code:
on *:CONNECT:var %c = $readini(channels.ini,channels,$network) | if (%c) join %c
on ME:*:JOIN:#:writeini channels.ini channels $network $addtok($readini(channels.ini,channels,$network),#,44)
on ME:*:PART:#:var %c = $remtok($readini(channels.ini,channels,$network),#,0,44) | $iif(%c,writeini,remini) channels.ini channels $network %c
Thanks it worked like a charm. laugh
it works for me, but it doesnt preserve all the servers. it only autoconnects on startup to the 1st server i had open previously. i have to manually connect to the other severs.

anyone have a fix?
To add servers to your auto-start simply use

Code:
ON *:START:server irc.server.com | server -m irc.server2.com | ...
Originally Posted By: argv0
To add servers to your auto-start simply use

Code:
ON *:START:server irc.server.com | server -m irc.server2.com | ...


thanks a lot, that worked perfectly

sorry i'm a noob
© mIRC Discussion Forums