You can do:
code:
var Command = "/Joel";
if(Message.substr(0, Command.length) == Command)
{
// The /Joel command was used.
}
And then you get the param by:
code:
var Param = Message.substr(Command.length, Message.length);
Edit: This is all done in the ChatWndSendMessage event. Read the scripting documentation for more information.