quote:
Originally posted by DarkGhost
if (/^\/([^\s\/]+)\s*([\s\S]*)$/.exec(sMessage) !== null) { whats this mean?
It is a regular expression.
Download and read the
JScript 5.6 Documentation > "Regular Expression Object" and "Regular Expression Syntax"
There are also many threads on these forums which are about regular expressions, including snippets and code examples.
To see what the above regular expression does, see
the link posted by markee which explains it.
In short: this one checks if the message of the user is a command and it splits up the message into the command part and the optional parameter part.
quote:
Originally posted by DarkGhost
also is there a way i can just like make it so the person who typed /command can only see the message
Show a
messagebox to the user. Or show a Messenger Plus! toast with the
MsgPlus.DisplayToast function, etc....
PS: Try not to double post. Instead, click on the edit button beneath your last post if you want to add something before someone replies.
PS: always read the given links; They are given for a reaon. Try to use the search function of the forum.