]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
commandmode: use Cmd_ExecuteString so semicolons don't start new commands
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 8 Jan 2009 16:07:01 +0000 (16:07 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 8 Jan 2009 16:07:01 +0000 (16:07 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8637 d7cf8633-e32d-0410-b094-e92efae38249

keys.c

diff --git a/keys.c b/keys.c
index 1d1355367ba922678fcd225b0aeac6d994599a0d..839652ea2f443db7162f1972f7d862b0833ee003 100644 (file)
--- a/keys.c
+++ b/keys.c
@@ -536,7 +536,7 @@ Key_Message (int key, char ascii)
        if (key == K_ENTER || ascii == 10 || ascii == 13)
        {
                if(chat_mode < 0)
-                       Cbuf_AddText(va("%s\n", chat_buffer));
+                       Cmd_ExecuteString(chat_buffer, src_command); // not Cbuf_AddText to allow semiclons in args; however, this allows no variables then. Use aliases!
                else
                        Cmd_ForwardStringToServer(va("%s %s", chat_mode ? "say_team" : "say ", chat_buffer));