I came up with this a few months ago, just after I'd started using more than one IRC network on a regular basis (at the time, it was oz.org, EFNet and Slashnet). Essentially, this allows you to keep preferences for multiple networks, so you can use the same "copy" (in multiple instances1), without having to resort to multiple shortcuts, ini files, etc.

Before we get into the meat, there's some theory to wade through. Sorry. I thought this would be a perfect opportunity to write some proper documentation for my scripts.

mIRC has a funky remote command called "on connect", which is triggered after the client connects to a server (just after the MOTD, in fact). If you take the name of the server, and put it into an if statement that checks for a string (such as "oz.org"), you can have the client perform different commands depending on what server you've connected to. So:


on 1:connect:{
         set %server1 $server
         if (slashnet.org isin %server1) {
                                     nick Zerotime
                                     join #everything
                                     join #catbox
                                     nickserv identify livenudesoy
        }
         if (efnet isin %server1) {
                              nick Zerotime
                              join #elitewarez
                              join #wallflower
        }
         if (oz.org isin %server1) {
                               nick Epoch
                               join #overclockers
                               msg z@channels.oz.org login #overclockers thefezlovescapitals
        }
         unset %server1
}


This assigns the server name to a variable, then runs it through a series of if statements to check for the name of a server (most likely this won't work on EFNet servers, because there isn't a common naming convention). If a server is matched, it performs a number of commands (setting a nick, joining channels, logging in to channel services), then unsets the variable. For some reason, the commands don't need a leading / when using them this way.

Much easier than using boring old performs, isn't it? If you want to use this as a basis for your own multiple server preferences thing, copy and paste the above into your remotes (Tools > Remotes...) and modify it from there.

Much kudos to Firemoth and `Messiah, who have taught me well in the ways of the script. This is all part of EpochScript, I guess. So give me some credit for it, please?


1Now that mIRC 6.02 has support for both multiple servers within one instance, and per-network performs, this probably isn't really all that useful anymore. I still do it this way, though, because I can set a different perform for every different server if I want to. Not that I do, or anything.

Log in or register to write something here or to contact authors.