mIRC Home    About    Download    Register    News    Help

Print Thread
L
LooseFlapper
LooseFlapper
L
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.
J
jaystew
jaystew
J


I think its

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




I could be wrong though.....


L
LooseFlapper
LooseFlapper
L
I'll give it a try, thanks. smile

L
LooseFlapper
LooseFlapper
L
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.
J
jaystew
jaystew
J

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

L
LooseFlapper
LooseFlapper
L
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.
J
jaystew
jaystew
J

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

Code:
 
if ($chan == CHANNELNAME) { 

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

L
LooseFlapper
LooseFlapper
L
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.

Link Copied to Clipboard