]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Chat: reverse command order
authorTimePath <andrew.hardaker1995@gmail.com>
Fri, 6 Apr 2018 09:54:31 +0000 (19:54 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Fri, 6 Apr 2018 09:54:31 +0000 (19:54 +1000)
qcsrc/client/main.qc
qcsrc/menu/command/notice.qc

index 20c50f57730be432742ecb2fe1f639d40ae41592..c0c04e7cdb38a05df01b660752d756c98a440e0c 100644 (file)
@@ -933,7 +933,7 @@ void CSQC_Parse_Print(string strMessage)
                        }
                        s = strcat("^3", s);
                }
-               localcmd("\n", autocvar__cl_hook_print, " ", itos(flags), " ", console_encode(s), "\n");
+               localcmd("\n", autocvar__cl_hook_print, " ", console_encode(s), " ", itos(flags), "\n");
        } else {
                print(ColorTranslateRGB(strMessage));
        }
index ba8dc327b22060bfc249f208ef5be35355e2eb3c..8fee54d4e7c6ed655fdcdc1abf9ab968ba511df5 100644 (file)
@@ -17,8 +17,8 @@ GENERIC_COMMAND(notice, "Append a notice to chat")
     {
         case CMD_REQUEST_COMMAND:
         {
-            int flags = stoi(argv(1));
-            string s = console_decode(substring(command, argv_start_index(2), argv_end_index(-1)));
+            string s = console_decode(substring(command, argv_start_index(1), argv_end_index(1) - argv_start_index(1)));
+            int flags = stoi(argv(2));
             s = ColorTranslateRGB(s);
             string prefix = (flags & NOTICE_CHAT) ? "\{3}" : "";
             if (!(flags & NOTICE_SILENT)) {