mIRC Home    About    Download    Register    News    Help

Print Thread
multiple words on notice event trigger help?? #91933 27/07/04 06:04 PM
Joined: Jun 2004
Posts: 291
W
whatsthedillio Offline OP
Fjord artisan
OP Offline
Fjord artisan
W
Joined: Jun 2004
Posts: 291
i was wondering if it is possible to have more than 1 word to trigger in the on *:notice....
for exammple
on *:notice:hello | hi | whats*up | yo*:?:{
but this doesnt work
but i CANNOT do it like
on *:notice:hello
on *notice:hi
it has to be in 1 single script
and it it isnot then
the ELSE part off the script will not work because there are differnt scripts which make the else useless
eg
on *:notice:hi:?:{
/notice $nick hello
else notice $nick go away
on *:notice:hello:?:{
/notice $nick hello
else notice $nick go away
when a user types hi the hello script will tell it to go away and vice versa
thats why it needs to be in one script
but i cant do it like
on *:notice:*:?:{ bla | bla |bla
because the words i use in the script
are like yo*wass*up
and uses *
if u understand pls help
its kinda hard to explain
thanks

Re: multiple words on notice event trigger help?? #91934 27/07/04 06:09 PM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
on $*:notice:/^(hello|hi|whats.*up|yo.*)$/:?:{

Edit: thanks qwerty wink

Last edited by tidy_trax; 27/07/04 06:20 PM.

New username: hixxy
Re: multiple words on notice event trigger help?? #91935 27/07/04 06:16 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Better use () instead of (?:), as the ":" there is considered a header field separator.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: multiple words on notice event trigger help?? #91936 27/07/04 07:11 PM
Joined: Apr 2004
Posts: 45
V
Venoman Offline
Ameglian cow
Offline
Ameglian cow
V
Joined: Apr 2004
Posts: 45
on $*:notice:/^(hello|hi|whats.*up|yo.*)$/:?:{
^

ok wha? can someone explain to me exactly what that's doing? does the $ in front tell it to eval? Is it a regular expression of some kind?

-Venoman

Re: multiple words on notice event trigger help?? #91937 27/07/04 08:06 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Yup, the $ event prefix tells mirc that the <matchtext> parameter is a regular expression. Type /help access levels and scroll down to "The $ prefix" for more on this.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com