mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2009
Posts: 5
T
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Aug 2009
Posts: 5
My bot currently has code that looks like this:

on 1:TEXT:*hello*:#:/msg $chan RAWR! Welcome
on 1:TEXT:*hiya*:#:/msg $chan RAWR! Welcome

I need help making it so i can have it look something like:

on 1:TEXT:*hiya*|*hello*:#:/msg $chan RAWR! Welcome

Except that doesn't work. Please help

Last edited by Teh_Wolfy; 16/08/09 07:33 AM.
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
There are a couple of ways of doing this.
This is my preferred method.
Code:
on *:text:*:#:{
  if (*hello* iswm $1-) || (*hiya* iswm $1-) {
    /msg $chan RAWR! Welcome
  }
}


Joined: Aug 2009
Posts: 5
T
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Aug 2009
Posts: 5
i was looking for something that is all one line but that works nice, tyvm!

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
You would need to use a regex match, if it can be done, to put it all on one line. I'm not familiar enough with regex yet to put it into a code.

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Originally Posted By: Teh_Wolfy
i was looking for something that is all one line
Originally Posted By: RusselB
You would need to use a regex match, if it can be done, to put it all on one line.
Here is it:
Code:
on $*:TEXT:/((h)ello|iya\S*)/iS:#:/msg $chan RAWR! Welcome


Link Copied to Clipboard