mIRC Homepage
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
on $*:notice:/^(hello|hi|whats.*up|yo.*)$/:?:{

Edit: thanks qwerty wink
Better use () instead of (?:), as the ":" there is considered a header field separator.
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
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.
© mIRC Discussion Forums