I had the same problem and created a patch. The patch adds a config param called "cl_show_srv_msgs". In the game, you can open the console with F1 and enter
, which disables server messages.
reenables the server messages. The only problem: You have to compile the client by yourself
There you go:
diff -Nur /tmp/teeworlds-0.4.3-src/src/game/client/gc_client.cpp src/game/client/gc_client.cpp
--- /tmp/teeworlds-0.4.3-src/src/game/client/gc_client.cpp 2008-08-31 15:30:58.000000000 +0200
+++ src/game/client/gc_client.cpp 2008-11-22 17:54:18.000000000 +0100
@@ -251,8 +251,16 @@
if(client_id == -1) // server message
{
- str_copy(chat_lines[chat_current_line].name, "*** ", sizeof(chat_lines[chat_current_line].name));
- str_format(chat_lines[chat_current_line].text, sizeof(chat_lines[chat_current_line].text), "%s", line);
+ if(config.cl_show_srv_msgs) {
+ str_copy(chat_lines[chat_current_line].name, "*** ", sizeof(chat_lines[chat_current_line].name));
+ str_format(chat_lines[chat_current_line].text, sizeof(chat_lines[chat_current_line].text), "%s", line);
+ } else
+ {
+ dbg_msg("chat", "ignoring server msg line %s", line);
+ strcpy(chat_lines[chat_current_line].name, "");
+ strcpy(chat_lines[chat_current_line].text, "");
+ return;
+ }
}
else
{
diff -Nur /tmp/teeworlds-0.4.3-src/src/game/g_variables.h src/game/g_variables.h
--- /tmp/teeworlds-0.4.3-src/src/game/g_variables.h 2008-08-31 15:30:58.000000000 +0200
+++ src/game/g_variables.h 2008-11-22 16:55:09.000000000 +0100
@@ -24,6 +24,7 @@
MACRO_CONFIG_INT(cl_show_welcome, 1, 0, 1)
MACRO_CONFIG_INT(cl_motd_time, 10, 0, 100)
+MACRO_CONFIG_INT(cl_show_srv_msgs, 1, 0, 1)
MACRO_CONFIG_STR(cl_version_server, 100, "version.teeworlds.com")