mIRC Home    About    Download    Register    News    Help

Topic Options
#229960 - 21/02/11 09:45 AM Connecting to multiple servers on startup? D:
Qmanjr5 Offline
Bowl of petunias

Registered: 21/02/11
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.

Top
#229965 - 21/02/11 11:07 AM Re: Connecting to multiple servers on startup? D: [Re: Qmanjr5]
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8338
Loc: NC, USA
Read this.
_________________________
Invision Support
#Invision on irc.irchighway.net

Top
#229979 - 21/02/11 09:36 PM Re: Connecting to multiple servers on startup? D: [Re: Riamus2]
Qmanjr5 Offline
Bowl of petunias

Registered: 21/02/11
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

Top
#229983 - 21/02/11 10:37 PM Re: Connecting to multiple servers on startup? D: [Re: Qmanjr5]
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8338
Loc: NC, USA
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

Top
#229991 - 22/02/11 06:02 AM Re: Connecting to multiple servers on startup? D: [Re: Qmanjr5]
FroggieDaFrog Offline
Fjord artisan

Registered: 16/04/10
Posts: 509
Loc: TN, USA
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.
_________________________
Code:
var %MOF = Question Life, the Universe and Everything
Echo MeaningOfLife is $len(%MOF)

Top
#230004 - 22/02/11 11:16 AM Re: Connecting to multiple servers on startup? D: [Re: FroggieDaFrog]
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8338
Loc: NC, USA
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

Top
#230167 - 27/02/11 12:38 AM Re: Connecting to multiple servers on startup? D: [Re: Qmanjr5]
Handle_With_Care Offline
Babel fish

Registered: 12/03/06
Posts: 52
Loc: Southern California, USA
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.36, 64-bit Win-7/SP1 Home Premium
IRC Operator irc.Prison.NET/irc.Eversible.com

Top
#230170 - 27/02/11 03:52 AM Re: Connecting to multiple servers on startup? D: [Re: Handle_With_Care]
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8338
Loc: NC, USA
There isn't anything wrong with connecting to multiple networks at once.
_________________________
Invision Support
#Invision on irc.irchighway.net

Top
#243242 - 01/11/13 03:16 PM Re: Connecting to multiple servers on startup? D: [Re: FroggieDaFrog]
mal7798 Offline
Self-satisified door

Registered: 01/11/13
Posts: 3
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?

Top
#243244 - 01/11/13 06:24 PM Re: Connecting to multiple servers on startup? D: [Re: mal7798]
Loki12583 Online
Hoopy frood

Registered: 22/01/04
Posts: 875
//echo $network on each network to see what it is

Top
#243246 - 01/11/13 09:07 PM Re: Connecting to multiple servers on startup? D: [Re: Loki12583]
mal7798 Offline
Self-satisified door

Registered: 01/11/13
Posts: 3
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.

Top
#243248 - 01/11/13 09:59 PM Re: Connecting to multiple servers on startup? D: [Re: mal7798]
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3403
Loc: Sweden/Borlänge
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,.) }

Top
#243250 - 02/11/13 01:10 AM Re: Connecting to multiple servers on startup? D: [Re: mal7798]
Iire Offline
Babel fish

Registered: 06/08/13
Posts: 64
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.


Edited by Iire (02/11/13 01:19 AM)

Top
#243266 - 03/11/13 02:04 AM Re: Connecting to multiple servers on startup? D: [Re: Iire]
mal7798 Offline
Self-satisified door

Registered: 01/11/13
Posts: 3
I got it to work, thanks! I think it was that missing brace.

Top