N1nja, I hope my example will serve you good for a reference:> *on $:text:/^!(news|post)\b/iS:#:{
; the above line is regex, which will match both the commands !news and !post respectively. The caret sign (^) will make sure the commands start with an exclamation mark, and the \b character will make sure the commands end with !news and !post; no more or less.
if (!%p) {
inc -u3 %p
; this is a trigger protection that will initiate the command every 3 seconds.
[b]if ($regml(1) == news) {
.msg # $iif(%news,News: $v1,No News is available yet!)
}[/b]
; if the command is !new, it'll message every one the latest news to the current channel; if not, it'll say otherwise.
[b]elseif (!$2) && ($nick == YourNickHere) {
.msg # $nick $+ , incorrect syntax: !post YourNewsHere
}[/b]
; if the allowed person enters the command !post without the news, it'll tell him or her how to enter it correctly.
[b]elseif ($nick == YourNickHere) {
set %news $2- < Posted by $nick >)
.msg # $nick $+ , the news has been set successfully!
}[/b]
; if the parameter has been set correctly, the command was a success.
[b]elseif ($nick != YourNickHere) {
.msg # $nick Access denied!
}[/b]
; If other disallowed users attempt to post a news, he or she will get told access denied.
}
}**