mIRC Home    About    Download    Register    News    Help

Topic Options
#243243 - 01/11/13 05:31 PM Script Auto Reply Key Words in other Channels
Jacob22 Offline
Nutrimatic drinks dispenser

Registered: 01/11/13
Posts: 5
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

Top
#243245 - 01/11/13 08:51 PM Re: Script Auto Reply Key Words in other Channels [Re: Jacob22]
Iire Offline
Babel fish

Registered: 06/08/13
Posts: 73
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.

Top
#243247 - 01/11/13 09:37 PM Re: Script Auto Reply Key Words in other Channels [Re: Iire]
Jacob22 Offline
Nutrimatic drinks dispenser

Registered: 01/11/13
Posts: 5
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?


Top
#243257 - 02/11/13 06:26 PM Re: Script Auto Reply Key Words in other Channels [Re: Jacob22]
Loki12583 Offline
Hoopy frood

Registered: 22/01/04
Posts: 1263
That has nothing to do with mIRC.

Top
#243260 - 02/11/13 08:59 PM Re: Script Auto Reply Key Words in other Channels [Re: Loki12583]
Jacob22 Offline
Nutrimatic drinks dispenser

Registered: 01/11/13
Posts: 5
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
}

Top
#243262 - 02/11/13 09:37 PM Re: Script Auto Reply Key Words in other Channels [Re: Jacob22]
Loki12583 Offline
Hoopy frood

Registered: 22/01/04
Posts: 1263
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 }
}

Top
#243265 - 03/11/13 01:56 AM Re: Script Auto Reply Key Words in other Channels [Re: Loki12583]
Jacob22 Offline
Nutrimatic drinks dispenser

Registered: 01/11/13
Posts: 5
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

Top