Bug 342852 - Display an error if only "/" entered, instead of throwing a JS exception.
ChatZilla only. r=samuel git-svn-id: svn://10.0.0.236/trunk@203250 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -354,6 +354,12 @@ function dispatch(text, e, isInteractive, flags)
|
||||
|
||||
/* split command from arguments */
|
||||
var ary = text.match(/(\S+) ?(.*)/);
|
||||
if (!ary)
|
||||
{
|
||||
display(getMsg(MSG_ERR_NO_COMMAND, ""));
|
||||
return null;
|
||||
}
|
||||
|
||||
e.commandText = ary[1];
|
||||
if (ary[2])
|
||||
e.inputData = stringTrim(ary[2]);
|
||||
|
||||
Reference in New Issue
Block a user