mIRC Homepage
Posted By: solomon Multiple Servers on startup? - 17/12/02 09:54 PM
Hi!

Is it possible to connect to multiple servers on different nets on startup? I want to connect to DALnet, EFnet and Quakenet on startup without having to manually open each new connection. Also: Is it possible to have more than one nickname at the same time (one for each net)?

thx.
Posted By: Hammer Re: Multiple Servers on startup? - 17/12/02 10:19 PM
Here are the lines that I, personally, use. Below that is a more generic example.
Code:

;  [ My version ]
on *:START:{
  server kernel-c.nj.us.dal.net 7000 %DALnet.password -i Hammer Nail -j %DALnet.channels
  server -m irc.Qeast.net -i Mike` Mike`` -j %EFnet.channels
}
;
;  [ Generic version ]
on *:START:{
  server kernel-c.nj.us.dal.net 7000 -i Nick1 Nick2 -j #mIRC,#HelpDesk
  server -m irc.Qeast.net 6667 -i Nick3 Nick4 -j #mIRC
  server -m barrysworld3.uk.quakenet.org 6667 -i Nick5 Nick6 -j #mIRC,#Help
}
Posted By: solomon Re: Multiple Servers on startup? - 18/12/02 04:41 PM
Thank you.

Ehm. I'm kind of a noob (concerning mirc), so.....where exactly do I put that? :-)

thx.

sol.
Posted By: Hammer Re: Multiple Servers on startup? - 18/12/02 04:43 PM
In your remotes (Alt+R). Make sure you change the data to something that's approriate for you. I don't want you using MY nicks. :tongue:
Posted By: Collective Re: Multiple Servers on startup? - 18/12/02 04:44 PM
Quote:
where exactly do I put that?

Press alt+r and copy and paste what Hammer said into the text box, click OK, and restart mIRC.
Posted By: Hammer Re: Multiple Servers on startup? - 18/12/02 06:18 PM
No need to restart mIRC. When you click OK to save and exit your remote scripts, it's automatically "active."
Posted By: Collective Re: Multiple Servers on startup? - 18/12/02 06:34 PM
To make sure it works you have to restart though...or reload the script file, but restarting is easier.
Posted By: Hammer Re: Multiple Servers on startup? - 18/12/02 08:38 PM
Ok. Thanks for the heads up; I needed that clarification of a problem that I've never had. Turns out I've been doing it wrong all these years. I've been scripting on a near-daily basis since March 9, 1998, when I stumbled into #HelpDesk on DALnet and a home. And in all these years, never once have I restarted mIRC to "activate" my script. I frequently don't even close my editor (Set as a desktop window [Alt-O->Display -> Windows], stretched to maximized size.) I simply Alt-File -> Save -> Alt-Tab -> trigger the script to test it and repeat until perfect. I suppose I will have to give up scripting altogether now because I'm certainly not going to keep restarting mIRC for every scripting change I make. It has been fun while it lasted, though. I've met some really wonderful people over the last 4¾ years on DALnet and elsewhere. I'd like to thank the Academy, my manager, my family and mostly you, my wonderful fans, for making this possible. You like me! You really like me!

Wait. Who am I kidding? I'm not wrong, so I'm not going anywhere. 4¾ years of mIRC scripting experience tells me this. There is no instance that I can think of where you might need to restart mIRC to test your script changes. Once you make a change and save it, it is active. End of story. You do not have to exit mIRC. You do not have to restart mIRC. It's active after you save it.
Posted By: dan8 Re: Multiple Servers on startup? - 19/12/02 01:49 PM
Dude, the whole purpose of your script is to perform an operation on startup. You're gonna need to restart the program to test that it actually joins the channels on startup lol. That's what he means.
Posted By: Collective Re: Multiple Servers on startup? - 19/12/02 02:01 PM
To make sure it works to his liking he would have to do reopen mIRC or reload the script file, regardless of how long you've spent using mIRC, and regardless of how well you are known on DALnet.

I know a script is active when you save it, I never said it wasn't, I simply said that on START only triggers when the script starts.
Posted By: acemiles_ed Re: Multiple Servers on startup? - 19/12/02 02:04 PM
on *:START:...

That means it preforms the script on startup. Is there anyway you START, without closing it and restarting?

Hammer has been coding a long time since most of us, maybe he knows of a way...
Posted By: Hammer Re: Multiple Servers on startup? - 19/12/02 02:29 PM
I must apologize profusely. I am completely at fault here. Obviously, longevity has nothing whatsoever to do with ability to read a thread in its entirety. I did not go back and reread the entire thread. I read Collective's post(s) as meaning that "to make any script active, you have to restart mIRC." I am completely and utterly in error. Of course you have to restart mIRC for an on START event to fire. Doh! Please accept my apologies for being an idiot. (Here, you can take back my Oscar now as well.)

There is a way to test out your on START event without restarting mIRC, though (although not as I had originally shown it above).
Code:
;  
on *:START: StartUp.Connect
;
alias StartUp.Connect {
  server kernel-c.nj.us.dal.net 7000 -i Nick1 Nick2 -j #mIRC,#HelpDesk
  server -m irc.Qeast.net 6667 -i Nick3 Nick4 -j #mIRC
  server -m barrysworld3.uk.quakenet.org 6667 -i Nick5 Nick6 -j #mIRC,#Help
}

Place the code it will execute inside an alias (which you can eventually make a local alias with alias -l after you are satisfied with it) and call the alias from your on START event. You can then execute the on START stuff again at any time by closing all your connections and calling the alias yourself with /StartUp.Connect from the command line.
Posted By: solomon Re: Multiple Servers on startup? - 19/12/02 02:42 PM
Thank you for that info Hammer. Is there a way to make this connect to a random DALnet or EFnet server?

thx

sol.
Posted By: Merlin Re: Multiple Servers on startup? - 19/12/02 02:51 PM
Due problems with DALnet you can't use a random DALnet server go here for active DALnet servers.
For EFnet (or other random network) servers goto File -> Options->Connect and select "Random" in the "IRC Network" drop down list.
Posted By: solomon Re: Multiple Servers on startup? - 19/12/02 03:00 PM
Hm. Ok. That was my fault. Not saying what I mean exactly.
I'm aware how to connect to a random Quakenet or EFNet server. I was just asking how to do it inside the alias hammer provided.

sol.
Posted By: Hammer Re: Multiple Servers on startup? - 19/12/02 03:05 PM
It depends on the network. Usually, irc.network will give you a random server; as Merlin said, though, currently DALnet has this disabled and you'll get the "Can't assign address" error if you tried to get to irc.dal.net. You might let mIRC itself use its server list and try to use something like this:
Code:

alias StartUp.Connect {
  server DALnet 7000 -i Nick1 Nick2 -j #mIRC,#HelpDesk
  server -m EFnet 6667 -i Nick3 Nick4 -j #mIRC
  server -m Quakenet 6667 -i Nick5 Nick6 -j #mIRC,#Help
}
Posted By: MPBrede Re: Multiple Servers on startup? - 19/12/02 09:07 PM
Am I glad I found this thread smile


Thanks hammer and others.

Where are the parametes documented? I want to make a few additions smile
Posted By: Collective Re: Multiple Servers on startup? - 19/12/02 09:15 PM
/server [-mn] <server/groupname> [port] [password] [-i nick anick email name] [-j #channel pass]
Connects you to a server, first disconnecting you from the current server.

/server irc.undernet.org 6667 mypassword

If you type /server with no parameters, mIRC will connect to the last server you used.
If you use the server command while still connected, you will be disconnected with your normal quit message and will then connect to the specified server.

You can also use /server N which connects to the Nth server in the server list in the connect dialog.

You can also use /server groupname which will cycle through all the servers in the server list
which have that group name until it connects to one of them.

The -m switch creates a new server window for that connection and connects to the server.
The -n switch does the same thing but does not connect to the server.


It's all in the help file..
Posted By: MPBrede Re: Multiple Servers on startup? - 19/12/02 09:25 PM
Thanks, that was quick. I was actually looking at the help file on mIRC. It omitted the email and name options from [-i nick anick email name]


Was it only for me that your post did not wrap and I had to scroll right a looong distance? smile
Posted By: Collective Re: Multiple Servers on startup? - 19/12/02 09:32 PM
I forgot the code tag stops wrapping...fixed
Posted By: cX_GX Re: Multiple Servers on startup? - 18/01/03 06:54 PM
thanks, that onstart was just what i needed
© mIRC Discussion Forums