mIRC Homepage
Posted By: LooseFlapper Connected to multiple servers - 27/02/14 06:39 PM
Hey!

So I am connected on 3 irc.twitch.tv servers with different usernames and to the same channels. How do I make it so that my scripts will only work on one of the servers and not all 3 if someone triggers it? smile

/Loose
Posted By: jaystew Re: Connected to multiple servers - 27/02/14 07:03 PM


I think its

Code:
if ($server == irc.server-name.com) {




I could be wrong though.....

Posted By: LooseFlapper Re: Connected to multiple servers - 27/02/14 07:04 PM
I'll give it a try, thanks. smile
Posted By: LooseFlapper Re: Connected to multiple servers - 27/02/14 07:35 PM
I am not sure what I am meant to put in where you said "irc.server-name.com" Is it the nickname that I want the script to work for or is it both the nickname and irc server?
Posted By: jaystew Re: Connected to multiple servers - 27/02/14 07:40 PM

Sorry, maybe I should of just used irc.server.com, It's just the server name needed no nicknames needed.
Posted By: LooseFlapper Re: Connected to multiple servers - 27/02/14 07:44 PM
Then that makes no difference. All of them are connected to irc.twitch.tv /: So if I were to put
Code:
if (server == irc.twitch.tv) {

it would still trigger on all 3. :P

Unless I am doing something wrong
Posted By: jaystew Re: Connected to multiple servers - 27/02/14 07:48 PM

So then you would need it to only work in a certain channel name rather than a certain server?

Code:
 
if ($chan == CHANNELNAME) { 
Posted By: LooseFlapper Re: Connected to multiple servers - 27/02/14 07:56 PM
No, the problem right now is if someone triggers a command in my chat, it'll respond 3 times. For example, if this was my script;
Code:
on *:text:*test*:#looseflappers: msg # Test complete...


It'd respond with this
Quote:
Looseflappers: Test complete...
User2: Test complete...
User3: Test complete...


I want only the Looseflappers one to respond.
Posted By: Loki12583 Re: Connected to multiple servers - 27/02/14 07:56 PM
Reading comprehension. He said he's on the same same server in the same channels. Check if ($me == somenick) to limit the events to a single nick. If you don't want them to be limited to a nick, you can check and set a variable to make sure you haven't already processed that event.
Posted By: LooseFlapper Re: Connected to multiple servers - 27/02/14 07:57 PM
Thank you, Loki. Haha. I feel kinda stupid now, I knew about the if ($me == somenick). :P
© mIRC Discussion Forums