From: Jason Hibbs Date: Fri, 3 Aug 2012 01:05:32 +0000 (-0700) Subject: /me support X-Git-Url: http://git.scottworley.com/reliable-chat/commitdiff_plain/d925d235c289dd7abd89fe618199a27255ad6d07 /me support --- diff --git a/webclient/rc.html b/webclient/rc.html index 3417745..4c05558 100644 --- a/webclient/rc.html +++ b/webclient/rc.html @@ -141,6 +141,17 @@ message = "<" + rcnick() + "> " + input; } + // /me support + var message; + var re = /^\/me (.*)/; + var match = re.exec(input); + var inputme = input.substring(4); + if (match) { + message = "* " + rcnick() + " " + inputme; + } else { + message = "<" + rcnick() + "> " + input; + } + // Remind people to set their nick if (rcnick() == 'anonymous') { rcaddmessagetohistory("-!- Set your nick with /nick");