mIRC Homepage
Posted By: clubbprez Echo - 26/06/14 12:46 PM
This should be simple enough, but I've just got back into learning IRC, and I've completely forget scripting...

I want a script that will echo in a certain channel whenever it see's my nick in another channel.

Please help...
Posted By: Nillen Re: Echo - 26/06/14 02:50 PM
When do you want the event to occur? When you're joining a #channel ?

This isn't the proper way, but it's a workaround I suppose.
The proper way is to use RAW and search the list for a matching string.
Code:
on me:*:join:#: {
  .timer 1 5 if (YOURNICKNAME ison #) echo #yourchannel Someone is using the nickname $v1 on $v2 $+ !
}
Posted By: clubbprez Re: Echo - 26/06/14 07:49 PM
The event should occur whenever my nick is mentioned in any channel name.

Suppose someone came on and said in #IRC: clubbprez, you here? I want it to echo in #mychannel something like: <time> <#IRC> nick: clubbprez, you here?
Posted By: Nillen Re: Echo - 26/06/14 08:13 PM
Ah, I see. You want it to trigger when someone mentions your nickname.

Code:
on *:text:*YOURNICKHERE*:#: echo 4 #YOURCHANNEL $nick mentioned me in # saying $1- 
You can enter a shorter version of your nick as well. People sometimes refer to me as "Nill" which means I'm using "* Nill*" to match my nickname. The * means that it should match any text, but since there's a space between the * and N it won't trigger on "Snill" for instance. It will however trigger on "Nills, Nille, Nillen, Nillie" since the * is bound to the last L in my case.

Just go ahead and paste this in your scripts editor in the remote section. Alt + R to open it.
Posted By: clubbprez Re: Echo - 26/06/14 08:51 PM
Thanks

I'm playing around with it, not sure I messed something up, but it's echoing to the current window, as opposed to the window of #mychannel. Here's what I got:

MyNick = clubbprez
MyChannel = #haynesworld

on *:text:* club*:#haynesworld: echo 4 #haynesworld $nick mentioned me in # saying $1-
Posted By: Nillen Re: Echo - 26/06/14 09:51 PM
That would only trigger in #haynesworld to begin with.
Code:
on *:text:* club*:#haynesworld:
means to only work in that #channel - Leave it as # to work in every #channel.
The echo itself is proper, it will echo in said #channel.
© mIRC Discussion Forums