mIRC Homepage
Posted By: Jeffen Connecting to multiple servers on startup - 28/12/16 06:53 AM
I want to connect to 3 servers when i start mIRC, right now it's just connecting to one of them.

i have several channels on the servers i want to connect to at start up as well

any idea of how i can do this?
Tools -> Script Editor -> Remote tab:

on *:start:{
server irc.freenode.net -j #cake,#foobar,##mirc
server -m irc.efnet.org
server -m irc.quakenet.org -j #chan1,#chan2

Edit it to whatever you want.
Posted By: Wolfie Re: Connecting to multiple servers on startup - 28/12/16 08:32 AM
I use a ON START event, similar to what is posted above. Difference is that I have it start a timer to run an alias. Also have function key aliases, so that I can skip the timer (start sooner) or cancel it (not connect at all). That way it's automated, but I have the option to make changes before connecting.

Something like this:
  var %t = 30
  echo -tag Starting in %t seconds, press SHIFT-F5 to ABORT or SHIFT-F8 to START now
  .timerStart 1 %t startup::run

alias sF5 {
  if ( $timer(Start) ) {
    .timerStart off
    echo -tag Timer Halted.
alias sF8 {
  if ( $timer(Start) ) {
    .timerStart off
    echo -tag Starting now.
    .timer 1 0 startup::run

alias startup::run {
  startup::connect (same params as /server command)
  startup::connect -m (same params as /server command)
alias startup::connect {
  echo -ts /!server $1-
  !server $1-

The benefit of the last bit is it shows you exactly what is being executed for the server command, so if something starts going wrong, you can go back and troubleshoot it.

Where you see 'startup::connect' inside the alias, treat that exactly like the /server command, using the same parameters. Don't include the '/server' command, only everything after it. As mentioned in the above post, use -m for all connections after the first. Or you could use it for all connections, and have the initial status window as a sort of 'root' window. Whatever floats your boat.
Posted By: Jeffen Re: Connecting to multiple servers on startup - 28/12/16 08:55 AM
on connect > options > perform... i have /msg Nickserv IDENTIFY password to perform on connect to all networks.

it seems that the script you gave me executes before the identifying command so that some channels wont connect since you need to be registered to do so.
any ides to fix that?
Posted By: Jeffen Re: Connecting to multiple servers on startup - 31/12/16 05:11 AM
That works but my nick doesnt run its registering until after i've connected to all the channels, so some channels that need a registered nick to access kicks me out

any idea how i run the nick register right after i've connected to the servers?
© mIRC Discussion Forums