Riko15
New Member
Posts: 6
28 / /
Joined: May 2010
|
O.P. RE: RE: Getting the Xth word of a sentence
quote: Originally posted by matty
Are these commands you are sending or commands that your contact is sending to you?
Other option is to do something like this:
js code: function OnEvent_ChatWndReceiveMessage(oChatWnd, sOrigin, sMessage, nMsgKind){
if (/^([\/|\!][^\s\/]+)\s*([\s\S]*)$/.exec(sMessage) !== null) {
if (RegExp.$1 === '!tfd' && RegExp.$2 === 'users') {
// put some code here
}
}
}
Both xD
|
|