I would like to join three networks, authenticate towards nicksrv and send a message to a bot /or auto-join a few channels when I launch my IRC client. I am using mIRC 7.55.
What the client should do depends on which network it is. So I have an if statement for it but it is not working correctly.
With one server it works perfect, as soon as I add more than one I have issues. Something must be wrong with my syntax, or maybe if there is something else I could use than $server
?
on *:start: {
/server irc.gazellegames.net:+7000
/server -m irc.scratch-network.net:+7000
/server -m irc.myanonamouse.net:+6697
}
on *:CONNECT: {
if ($server = "horus.gazellegames.net" || "anubis.gazellegames.net") {
/msg NickServ IDENTIFY password
/msg Vertigo ENTER username password
}
if ($server = brooklyn.scratch-network.net) {
/msg NickServ IDENTIFY password
/msg Drone enter #channel1 username password
}
if ($server = "irc.myanonamouse.net" || "irc2.myanonamouse.net") {
/msg NickServ IDENTIFY password
/j #channel1,#channel2
}
}
Expected result would be to join the networks and follow the IF STATEMENT and authenticate with correct credentials for each network. Script works but it is unreliable.
The script seems to send everything to first server it connects to, see snippet here: https://i.stack.imgur.com/vGuC4.jpg
And it is unable to join the second channel for irc.myanonamouse.net/irc2.myanonamouse.net.
I would like to avoid leaking my credentials and automate it, so I just need to launch the client to join all networks, authenticate, message a bot or join a few channels.