From 855c6c0a53bd609cf7c8267acf7025918c9ee5bb Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Thu, 26 Jul 2007 19:58:48 +0000 Subject: fixed so that you can't send empty lines --- src/game/client/game_client.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/game/client/game_client.cpp') diff --git a/src/game/client/game_client.cpp b/src/game/client/game_client.cpp index aab0950a..fccd11ed 100644 --- a/src/game/client/game_client.cpp +++ b/src/game/client/game_client.cpp @@ -1165,10 +1165,13 @@ void modc_render() if(chat_active) { // send message - msg_pack_start(MSG_SAY, MSGFLAG_VITAL); - msg_pack_string(chat_input, 512); - msg_pack_end(); - client_send_msg(); + if(chat_input_len) + { + msg_pack_start(MSG_SAY, MSGFLAG_VITAL); + msg_pack_string(chat_input, 512); + msg_pack_end(); + client_send_msg(); + } } else { -- cgit 1.4.1