mIRC Homepage
Posted By: TillableToast Need help with an event trigger - 24/05/16 01:14 AM
I want it to only run the code when a users types "!<commandname>" which works but there seems to be a problem when somebody types a message containing a "!" it triggers

ex: "Hi there!" would trigger the text event.

Code:
on $*:TEXT:m/\!.*/iS:#:{

code to run...

}


Any help would be appreciated!

Kind Regards
TillableToast
Posted By: Sakana Re: Need help with an event trigger - 24/05/16 01:24 AM
Add a ^ after the first /

^ indicates the beginning of the string
Posted By: TillableToast Re: Need help with an event trigger - 24/05/16 02:17 AM
Thank you! It works perfectly now.
Do you know any good sites to learn about this?
Posted By: Sakana Re: Need help with an event trigger - 24/05/16 02:26 AM
This site is pretty good for trying out expressions or looking things up!

http://regexr.com/
Posted By: Wims Re: Need help with an event trigger - 24/05/16 12:10 PM
To learn, http://www.regular-expressions.info/ is best, to try some pattern http://www.regex101.com is best
© mIRC Discussion Forums