mIRC Homepage
Hi all!

I've been searching around to see if there was any script or program that was already made or that I could tinker with to do this.
Suppose that you are in an IRC chat room, not your own, and if keyword1 popped up in irc chat room, you would reply with response1, if keyword2 popped up, response2... etc...

Everything I am finding for chat auto responders and triggers all are for if you own the channel, is there anything to do that if you are simply on someone elses channel?

I appreciate any help in the right direction! smile
It doesn't matter who the channel belongs to; just put the channel name in the target parameter, and the script should trigger there... eg:
Code:
on *:TEXT:*help*:#donotaskforhelp:{ }

will trigger when "help" is found in a msg sent to #donotaskforhelp

Code:
on @*:TEXT:*damn*:#donotsaydamn:{ ]

will trigger when "damn" is found in a msg set to #donotsaydamn and the client with the script is an op.

As long as the client with the script is joined to the channel in question, the script will trigger (or at least attempt to) when appropriate.

Just be careful, because some channels won't want you to use scripts in their channels.
Thanks for replying!

I tried that and it doesn't appear to work with the IRC i'm on.

Are there any other possible solutions outside of using the irc messager system, like an outside program that scans the irc chat and triggers? Or a greasemonkey script that scans the irc chat in a browser and then triggers?

That has nothing to do with mIRC.
sorry about that, but now I see how to use the scripts you suggested, thank you!

One more question:
I know that I can implement this code to scan channel A for a key word and give a response
Code:
on *:TEXT:*Keyword1*:#ChannelA:{
  /msg $chan response1
}


How can I have the script scan channel A for Keyword1 and give response1 AND also scan channel A for Keyword2 and give response 2?

I've tried this, but when I do this it only returns response1 regardless if it is keyword 1 or 2.
Code:
on *:TEXT:*Keyword1*:#ChannelA:{
  /msg $chan response1
}
on *:TEXT:*Keyword2*:#ChannelA:{
  /msg $chan response2
}
That will catch the second word unless the first word was also said in the same line. Was that the case? If you want to handle that case, you'll need to use a single event and check the text within.

Code:
on *:text:*:#chana:{
  if (word1 isin $1-) { msg # hello }
  if (word2 isin $1-) { msg # there }
}
Thanks again! it wasn't working as I had a timer function, but didn't assign them different names, however now it is working smile
© mIRC Discussion Forums