hedgewars/uChat.pas
changeset 10392 5012e1f9e893
parent 10376 e8c933a00f97
child 10396 77ff1db6d6e4
--- a/hedgewars/uChat.pas	Fri Aug 22 00:37:26 2014 +0400
+++ b/hedgewars/uChat.pas	Fri Aug 22 00:57:07 2014 +0400
@@ -262,6 +262,12 @@
 ParseCommand('/hogsay '+s, true)
 end;
 
+procedure SendConsoleCommand(s: shortstring);
+begin
+    Delete(s, 1, 1);
+    SendIPC('~' + s)
+end;
+
 procedure AcceptChatString(s: shortstring);
 var i: TWave;
     j: TChatCmd;
@@ -383,7 +389,10 @@
                 ParseCommand(ChatCommandz[j].ProcedureCallChatCmd, true);
                 exit
                 end;
-        end
+        end;
+
+    if (gameType = gmtNet) then
+        SendConsoleCommand(s)
     end
 else
     begin