mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2003
Posts: 3
K
kharma Offline OP
Self-satisified door
OP Offline
Self-satisified door
K
Joined: Dec 2003
Posts: 3
I've had a search on the forum but I wasn't able to find anything relevant to my question. If this has indeed been answered before I'm sorry, the search function on this site is a little strange.

My question is, is it possible to list several words in an on *:TEXT: event, but fire if any of them match? I only ask this because it would save me an awful lot of trouble with a script of mine. Example:
Code:
on *:TEXT:*bla* or *monkey* or *hat*:#: /msg $chan Don't speak such nonsense!  
In the above, the action would trigger if anyone on the chan said at least one of the words. I'm just wondering if a) This is possible without having to split it up into multiple TEXT events and b) What the actual code for it is.

Thanks

Joined: Nov 2003
Posts: 6
Q
Qw_ Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
Q
Joined: Nov 2003
Posts: 6
on *:TEXT:/(word1|word2|word3)/iS:#: {
kick $nick
echo $nick was kicked for word $regml(1)
}


while ( 0 = 0 ) { echo 4 IRC is cancer for You! Type /exit !!! }
Joined: Dec 2002
Posts: 14
W
Pikka bird
Offline
Pikka bird
W
Joined: Dec 2002
Posts: 14
Or you could use:

Code:
on *:TEXT:*:#:if (*bla* iswm $1-) || (*dum* iswm $1-) { msg $nick poop! }


Which is probably easier to understand smile.

Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
That script doesn't work.

You missed the $ prefix and the first parameter for /kick..


Link Copied to Clipboard