mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2004
Posts: 291
W
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

Joined: Nov 2003
Posts: 2,327
T
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
Joined: Jan 2003
Posts: 2,523
Q
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
Joined: Apr 2004
Posts: 45
V
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

Joined: Jan 2003
Posts: 2,523
Q
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

Link Copied to Clipboard