double leading slash escapes a command
authorMischa POSLAWSKY <netris@shiar.org>
Sun, 4 Mar 2007 12:32:56 +0000 (13:32 +0100)
committerMischa POSLAWSKY <netris@shiar.org>
Sun, 4 Mar 2007 12:32:56 +0000 (13:32 +0100)
For example //foo is taken as literal "/foo".

client.c

index 1b48a8e100ba87599d33b84b42de7ca0c7888210..0974c222aa6de2c3ed171e71093eccaf3813619a 100644 (file)
--- a/client.c
+++ b/client.c
@@ -362,8 +362,11 @@ void OneGame(void)
        void handle_str(char *str)
        {
                if (chatText[0] == '/') {
+                       if (chatText[1] != '/') {
                                handle_cmdstr(chatText + 1);
                                return;
+                       }
+                       memmove(chatText, chatText + 1, strlen(chatText));
                }
 
                Message("<\\%d%s\\7> %s",