mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2014
Posts: 16
L
Pikka bird
OP Offline
Pikka bird
L
Joined: Feb 2014
Posts: 16
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

Last edited by LooseFlapper; 27/02/14 06:40 PM.

/Loose
Joined: Jan 2014
Posts: 55
J
Babel fish
Offline
Babel fish
J
Joined: Jan 2014
Posts: 55


I think its

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




I could be wrong though.....



Regards

JayStew
Joined: Feb 2014
Posts: 16
L
Pikka bird
OP Offline
Pikka bird
L
Joined: Feb 2014
Posts: 16
I'll give it a try, thanks. smile


/Loose
Joined: Feb 2014
Posts: 16
L
Pikka bird
OP Offline
Pikka bird
L
Joined: Feb 2014
Posts: 16
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?

Last edited by LooseFlapper; 27/02/14 07:38 PM.

/Loose
Joined: Jan 2014
Posts: 55
J
Babel fish
Offline
Babel fish
J
Joined: Jan 2014
Posts: 55

Sorry, maybe I should of just used irc.server.com, It's just the server name needed no nicknames needed.


Regards

JayStew
Joined: Feb 2014
Posts: 16
L
Pikka bird
OP Offline
Pikka bird
L
Joined: Feb 2014
Posts: 16
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

Last edited by LooseFlapper; 27/02/14 07:53 PM.

/Loose
Joined: Jan 2014
Posts: 55
J
Babel fish
Offline
Babel fish
J
Joined: Jan 2014
Posts: 55

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

Code:
 
if ($chan == CHANNELNAME) { 


Regards

JayStew
Joined: Feb 2014
Posts: 16
L
Pikka bird
OP Offline
Pikka bird
L
Joined: Feb 2014
Posts: 16
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.

Last edited by LooseFlapper; 27/02/14 07:56 PM.

/Loose
Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
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.

Joined: Feb 2014
Posts: 16
L
Pikka bird
OP Offline
Pikka bird
L
Joined: Feb 2014
Posts: 16
Thank you, Loki. Haha. I feel kinda stupid now, I knew about the if ($me == somenick). :P

Last edited by LooseFlapper; 27/02/14 07:57 PM.

/Loose

Link Copied to Clipboard