mIRC Home    About    Download    Register    News    Help

Print Thread
Connecting to multiple servers on startup? D: #229960 21/02/11 09:45 AM
Joined: Feb 2011
Posts: 2
Q
Qmanjr5 Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
Q
Joined: Feb 2011
Posts: 2
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.

Re: Connecting to multiple servers on startup? D: [Re: Qmanjr5] #229965 21/02/11 11:07 AM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
Read this.


Invision Support
#Invision on irc.irchighway.net
Re: Connecting to multiple servers on startup? D: [Re: Riamus2] #229979 21/02/11 09:36 PM
Joined: Feb 2011
Posts: 2
Q
Qmanjr5 Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
Q
Joined: Feb 2011
Posts: 2
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

Re: Connecting to multiple servers on startup? D: [Re: Qmanjr5] #229983 21/02/11 10:37 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
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) { }


Invision Support
#Invision on irc.irchighway.net
Re: Connecting to multiple servers on startup? D: [Re: Qmanjr5] #229991 22/02/11 06:02 AM
Joined: Apr 2010
Posts: 923
F
FroggieDaFrog Offline
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 923
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.


I am SReject
My Stuff
Re: Connecting to multiple servers on startup? D: [Re: FroggieDaFrog] #230004 22/02/11 11:16 AM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
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.


Invision Support
#Invision on irc.irchighway.net
Re: Connecting to multiple servers on startup? D: [Re: Qmanjr5] #230167 27/02/11 12:38 AM
Joined: Mar 2006
Posts: 61
H
Handle_With_Care Offline
Babel fish
Offline
Babel fish
H
Joined: Mar 2006
Posts: 61
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.


mIRC 7.51, 64-bit Win-7/SP1 Home Premium
IRC Operator irc.Prison.NET
Re: Connecting to multiple servers on startup? D: [Re: Handle_With_Care] #230170 27/02/11 03:52 AM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
There isn't anything wrong with connecting to multiple networks at once.


Invision Support
#Invision on irc.irchighway.net
Re: Connecting to multiple servers on startup? D: [Re: FroggieDaFrog] #243242 01/11/13 03:16 PM
Joined: Nov 2013
Posts: 4
M
mal7798 Offline
Self-satisified door
Offline
Self-satisified door
M
Joined: Nov 2013
Posts: 4
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?

Re: Connecting to multiple servers on startup? D: [Re: mal7798] #243244 01/11/13 06:24 PM
Joined: Jan 2004
Posts: 1,275
L
Loki12583 Online
Hoopy frood
Online
Hoopy frood
L
Joined: Jan 2004
Posts: 1,275
//echo $network on each network to see what it is

Re: Connecting to multiple servers on startup? D: [Re: Loki12583] #243246 01/11/13 09:07 PM
Joined: Nov 2013
Posts: 4
M
mal7798 Offline
Self-satisified door
Offline
Self-satisified door
M
Joined: Nov 2013
Posts: 4
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.

Re: Connecting to multiple servers on startup? D: [Re: mal7798] #243248 01/11/13 09:59 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: Connecting to multiple servers on startup? D: [Re: mal7798] #243250 02/11/13 01:10 AM
Joined: Aug 2013
Posts: 73
Iire Offline
Babel fish
Offline
Babel fish
Joined: Aug 2013
Posts: 73
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.

Last edited by Iire; 02/11/13 01:19 AM.
Re: Connecting to multiple servers on startup? D: [Re: Iire] #243266 03/11/13 02:04 AM
Joined: Nov 2013
Posts: 4
M
mal7798 Offline
Self-satisified door
Offline
Self-satisified door
M
Joined: Nov 2013
Posts: 4
I got it to work, thanks! I think it was that missing brace.

Re: Connecting to multiple servers on startup? D: [Re: mal7798] #254032 19/07/15 01:32 PM
Joined: Nov 2013
Posts: 4
M
mal7798 Offline
Self-satisified door
Offline
Self-satisified door
M
Joined: Nov 2013
Posts: 4
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.