Reconnect on disconnect Show connect on startup Check connection time out Preserve nicknames Tools -> Options -> IRC Rejoin channels on connect Keep channels open
Ok, so a few people have asked me in the past few days how they can setup auto-join to their different irc servers. I'm going to post a detailed guide onto how you can set it up correctly. Here's a run-down of what this script does incase you don't understand the code:
1. Connect to an IRC server. 2. Automatically NickServ GHOST your nick incase you were disconnected via a ping timeout. When you temporarily lose your connection, your IRC client will notice and try reconnecting. (often with your old nickname followed with an underscore) This script will GHOST your nick for you. 3. After it GHOSTs your nick, it will switch back to your old nick and then IDENTIFY with NickServ for you. 4. Now the script will join your channels.
OK, so now that I have explained it, here is a run-down, line by line, of what you will have to change in your script. First, we're going to setup servers. Originally Posted by mIRC on *:START: { /server irc.server1.com 6667 /server -m irc.server2.com 6667 } The 2nd line of that needs to be changed to your first server you want to connect to. If you'd like to use SSL instead of the non-encrypted port 6667, you can change the 6667 to +6697 for SSL. The next /server line is for your second server. For your second server and on, you need to have a -m after the /server. This will tell mIRC to bring up that server in another server window, rather than connecting over the first one.
Now we're going to edit what happens after we connect to the server. Originally Posted by mIRC on *:CONNECT: { if ($network == Server1NET) { /nick YourNick__ .msg NickServ GHOST YourNick <your password here> /nick YourNick .msg NickServ IDENTIFY <your password here> ; Put any channels you'd like to join under this line. /join #Channel1 /join #Channel2 } We have more to do in this section than the other. First, we need to connect to the first server. Once you are connected, type this in your irc client: Code: //echo -a $network If you were connected to IRC.AustIRC.net, you would see that it would return AustIRC. This will let the script know that we're connecting to the right server. Replace Server1NET with whatever returns from the code above. (So irc.austirc.net would be AustIRC, like said in the example)
On the line that says Code: /nick YourNick__ Replace YourNick with your nick followed by two underscores. So, if your nick was ToMz, you would put ToMz__.
On the line that says Code: .msg NickServ GHOST YourNick <your password here> Change YourNick to your usual nick. Where it says <your password here> put your NickServ password.
On the line that says Code: /nick YourNick Put your usual nick.
On the line that says Code: .msg NickServ IDENTIFY <your password here> Replace <your password here> with your NickServ password.
Under the line that says Code: ; Put any channels you'd like to join under this line. Well.. it can't be more simpler than that. Remove the join lines for #Channel1 and #Channel2 and replace them with as many join lines as you want. Any thing else that you'd like to do (i.e. message a bT tracker's bot to invite you) would also be put under that line. :) Almost done!
For all the other servers, all you have to do is add the following under the first [ bracket for that class. Example: Originally Posted by mIRC on *:CONNECT: { if ($network == Server1NET) { /nick YourNick__ .msg NickServ GHOST YourNick <your password here> /nick YourNick .msg NickServ IDENTIFY <your password here> ; Put any channels you'd like to join under this line. /join #Channel1 /join #Channel2 } if ($network == Server2World) { /nick YourNick__ .msg NickServ GHOST YourNick <your password here> /nick YourNick .msg NickServ IDENTIFY <your password here> ; Put any channels you'd like to join under this line. /join #Channel1 /join #Channel2 } } I have marked all of the brackets in red.
So if you'd like to add a third server to this guide, simply add the following right under the next-to-last closing bracket: Originally Posted by mIRC if ($network == IRCServer3) { /nick YourNick__ .msg NickServ GHOST YourNick <your password here> /nick YourNick .msg NickServ IDENTIFY <your password here> ; Put any channels you'd like to join under this line. /join #Channel1 /join #Channel2 } OK, so now that you're smart enough to read all the directions before trying to download it, here's the script!
There it is. I'm going to refer to it as ToMzAutojoin.mirc for the rest of the guide, so you might as well save it as that. Originally Posted by ToMzAutojoin.mirc on *:START: { /server irc.server1.com 6667 /server -m irc.server2.com 6667 }
on *:CONNECT: { if ($network == Server1NET) { /nick YourNick__ .msg NickServ GHOST YourNick <your password here> /nick YourNick .msg NickServ IDENTIFY <your password here> ; Put any channels you'd like to join under this line. /join #Channel1 /join #Channel2 } if ($network == Server2World) { /nick YourNick__ .msg NickServ GHOST YourNick <your password here> /nick YourNick .msg NickServ IDENTIFY <your password here> ; Put any channels you'd like to join under this line. /join #Channel1 /join #Channel2 } } You can also download my script with this download link.
Now we are going to place the script in the correct folder. In mIRC, type this: Code: //run $mircdir This will bring us to where your mIRC data is. If you run NoNameScript, you will be brought to that folder instead of the mIRC folder. This is _not_ Program Files - this is mIRC/NoNameScript's entry in your AppData folder. Save or copy-and-paste the script to that directory, preferably as ToMzAutojoin.mirc as said above.
Now you can edit it to your wishes as described above. Now to make sure it starts every time, hit Alt - R on your keyboard to get into your Remotes scripting menu. Scroll down all the way to the bottom of whatever file is currently there, and add Code: /load -rs ToMzAutojoin.mirc (assuming you saved it as that)
Restart your mIRC. If you followed the directions correctly (and if I didn't screw up in writing this guide :P) you should be auto-connected to your servers (and channels if you set it to).
If you have any problems with this script, feel free to PM me here or via IRC, I'm usually always there.
I claim _all_ credit for this script and guide. I wrote it all completely, myself. :laugh: