From: Scott Worley Date: Sun, 19 Aug 2012 18:31:23 +0000 (-0700) Subject: /nick requires an argument X-Git-Url: http://git.scottworley.com/reliable-chat/commitdiff_plain/a7a2c8b6c0d41519e516008ba2306c4a3948c40b /nick requires an argument --- diff --git a/webclient/rc.html b/webclient/rc.html index c1d36b2..4a956ea 100644 --- a/webclient/rc.html +++ b/webclient/rc.html @@ -468,8 +468,13 @@ rcaddmessagetoUI({'Text': '-!- Your nick is already ' + rcnick(), 'ServerTimes': {}}); return; } - message = "*** " + rcnick() + " is now known as " + rest; - rcsetnick(rest); + if (rest) { + message = "*** " + rcnick() + " is now known as " + rest; + rcsetnick(rest); + } else { + rcaddmessagetoUI({'Text': '-!- /nick requires an argument', 'ServerTimes': {}}); + return; + } } else { rcaddmessagetoUI({'Text': '-!- No such command: ' + command, 'ServerTimes': {}}); return;