mIRC Homepage
I've been trying to figure this out for ages: HOW DO I JOIN MULTIPLE SERVERS WHEN I STARTUP MIRC?! D:

Can anyone help me out? Be it a script, or a certain option.
Read this.
on *:START:{
server irc.network1.net
server -m irc.network2.net
server irc.network1.net -j #chan1,#chan2
}

Would be the code, right? What if I wanted to identify my nick? I have to message nickserv, but what and where would I type the commands? frown
Either use an on NOTICE event, on CONNECT event, or just put the commands into Perform in mIRC's options.

Also, you only want to use one /server line for each network. Just put your -j on the first line. And for multiple networks, always use -m for every line other than the first. Otherwise, you'll connect to the new server on the active window (disconnecting the current one).

Here's an on NOTICE example, though you'll have to adjust it to match your network(s).

Code:
on *:notice:*/msg NickServ IDENTIFY*:?: {
  if ($nick == NickServ) { msg NickServ IDENTIFY password }
}


You would need to adjust the first line to match whatever message the network(s) you use tells you when you connect. Most that use NickServ will use that line telling you that you need to identify. If it's something else, change it there. And, if the command to identify is different, then change that on line two as well.

Be aware that this is not "safe" on networks that do not have NickServ because anyone who changes their nick to NickServ could notice you with that command and get your password. You can make it safer by putting an extra check in that IF statement...

For example:
Code:
if ($nick == NickServ && $network == Efnet) { }
just an example but here ya go
Code:
on *:START:{
  server <server[:port]*>
  server -m <server2[:port]*>
  server -m <server3[:port]*>
  server -m <server4[:port]*>
  ;and so on....
}

on *:CONNECT:{
  if ($network == Network) {
    nickserv identify ...
    join #chan,#chan2,#chan3,...
  }
  elseif ($network == Network2) { 
    nickserv identify ...
    join #chan,#chan2,#chan3,...
  }
  elseif ($network == Network3) {
    nickserv identify ...
    join #chan,#chan2,#chan3,...
  }
  ;and so on
}
* Note: You can specify a network if it has servers stored in the servers.ini file.

** Note: It's also advised NOT to store your passwords hard coded into your script for security reasons.
Be aware that using the on CONNECT event to identify to network services can backfire at times because the password can be sent too soon and gets "lost" before the network is watching for it. This doesn't affect every network, and most should be fine, but that is why I suggested the on NOTICE event and just watch for the request to identify so you know it happens at the right time. If you want to, you can even use that message to determine the correct format of the identification for the server, saving script space. For example, not every service using the standard /msg nickserv identify password format. And, if you connect to a foreign server, the language may be different even if the actual translation is the same.
I tend to recommend against connecting to more than one server simultaneously for two reasons: First, this is often done by mass spammers, but fortunately, because of the next reason, they tend to screw themselves up entirely.

The other reason is that Murphy lives. While you could do that by just putting /server -m server2, server3, etc. in Perform, things don't always go as planned. Servers often burp, disconnect, and other nasties. This could cause all kinds of problems.
There isn't anything wrong with connecting to multiple networks at once.
The on START part of the script works fine but the on CONNECT doesn't do anything. Here is what my remote.ini file looks like:

[script]
n0=on *:START:{
n1= server gns.de.eu.mixxnet.net
n2= server -m irc.zeronode.net
n3= server -m irc.freenode.net
n4=
n5=on *:CONNECT:{
n6= if ($network == MIXXnetSERVER) {
n7= nickserv identify password
n8= join #chan
n9= }
n10= elseif ($network == ZeroNodeSERVER) {
n11= nickserv identify password
n12= join #chan
n13= }
n14= elseif ($network == freenodeSERVER) {
n15= nickserv identify password
n16= join #chan
n17= }
n18= }


I added SERVER to the end of each network name after the servers.ini seemed to want to add them. But it didn't work either way. How does it know what the $network is called?
//echo $network on each network to see what it is
I tried that and the server names were exactly what I had in there before. It connects to the servers but doesn't verify the passwords or join the channels. It just sits in the status windows.
You didnt add this part in the file?

[script]
n0=
n1=
n2=

and so on, if you did, then remove that part from the text, it will be added by default if you using the script editor in mirc. ALT + R, you dont see it but mirc using it in ini files.
mal7798: Your on START script is missing a } bracket (looks like on line 5). Try opening the script in the script editor and adding it.

Also, it's quite likely that the $network values won't have "SERVER" at the end of them.
I got it to work, thanks! I think it was that missing brace.
I installed an update and may have used the full install option by mistake, so I'm back to where I started. When looking up information on this topic I found an old thread of my own posts when I previously asked for help.

Okay, I have this in my REMOTE.INI file:

----------------------------------
on *:START:{
server gns.de.eu.mixxnet.net
server -m irc.zeronode.net
server -m asimov.freenode.net
}
on *:CONNECT:{
if ($network == MIXXnet) {
nickserv identify password
join #channel
}
elseif ($network == ZeroNode) {
nickserv identify password
join #channel
}
elseif ($network == freenode) {
nickserv identify password
join #channel
}
}
----------------------------------

My question: How do I get REMOTE.INI to run upon program startup? I had it working before (I solved the problem), but the update set my settings back to defaults and it no longer works. I just need REMOTE.INI to run when I start up the program, that's all. Thanks for help.
© mIRC Discussion Forums