From: Scott Worley Date: Sun, 19 Aug 2012 14:30:46 +0000 (-0700) Subject: /nick currentnick should do nothing X-Git-Url: http://git.scottworley.com/reliable-chat/commitdiff_plain/219b6a2b2ef21772217935e79398305a086000d7?hp=112df9d11e5a30edba4bdcb065d68e182ef1d694 /nick currentnick should do nothing --- diff --git a/webclient/rc.html b/webclient/rc.html index d06f515..2e05a86 100644 --- a/webclient/rc.html +++ b/webclient/rc.html @@ -443,7 +443,7 @@ function rcinput(input) { var message; - var re = /^\/(\S+)(\s(.*))?/ + var re = /^\/(\S+)(\s(.*))?/; var match = re.exec(input); if (match) { var command = match[1]; @@ -451,6 +451,10 @@ if (command == 'me') { message = "* " + rcnick() + " " + rest; } else if (command == 'nick') { + if (rcnick() == rest) { + rcaddmessagetoUI({'Text': '-!- Your nick is already ' + rcnick(), 'ServerTimes': {}}); + return; + } message = "*** " + rcnick() + " is now known as " + rest; rcsetnick(rest); } else {