1

Topic: hide server messages

hi there

is there any chance of getting say a console command or cfg file option to turn off server messages (the yellow ones in the bottom left)?

eg server_messages 0

some servers spit out a lot of junk messages and they just obscure the screen instead of being helpful. it would be nice to just get rid of them altogether smile

2

Re: hide server messages

You could just do a check in the chat rendering to continue when there client sending is -1.

3

Re: hide server messages

Yesterday i thought about this problem, too.
If you use the Race mod (Download: Windows,Linux), you could type sv_silent_mode 1  big_smile

MyRace:   |   run_fool
Help
Me:    |   Pennergame
My
Clan:    |   «Òó°L»

4

Re: hide server messages

only problem is... rajh's server is down wink

uptee - a simple web interface for hosting and maintaining teeworlds servers
teerace - a website gathering results of trusted Race-mod servers providing global ranking and statistics
*gV* rox ^^

5

Re: hide server messages

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

cl_show_srv_msgs 0

, which disables server messages.

cl_show_srv_msgs 1

reenables the server messages. The only problem: You have to compile the client by yourself sad

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")

6

Re: hide server messages

Here is the patch for version 0.5.1

diff -Nur /tmp/teeworlds-0.5.1-src/src/game/client/components/chat.cpp ./src/game/client/components/chat.cpp
--- /tmp/teeworlds-0.5.1-src/src/game/client/components/chat.cpp    2009-01-25 14:50:33.000000000 +0100
+++ ./src/game/client/components/chat.cpp    2009-04-21 16:23:06.000000000 +0200
@@ -107,8 +107,18 @@
 
     if(client_id == -1) // server message
     {
-        str_copy(lines[current_line].name, "*** ", sizeof(lines[current_line].name));
-        str_format(lines[current_line].text, sizeof(lines[current_line].text), "%s", line);
+        if(config.cl_show_srv_msgs) 
+        {
+            str_copy(lines[current_line].name, "*** ", sizeof(lines[current_line].name));
+            str_format(lines[current_line].text, sizeof(lines[current_line].text), "%s", line);
+        }
+        else 
+        {
+            dbg_msg("chat", "ignoring server msg line %s", line);
+            strcpy(lines[current_line].name, "");
+            strcpy(lines[current_line].text, "");
+            return;
+        }
     }
     else
     {
diff -Nur /tmp/teeworlds-0.5.1-src/src/game/variables.hpp ./src/game/variables.hpp
--- /tmp/teeworlds-0.5.1-src/src/game/variables.hpp    2009-01-25 14:50:33.000000000 +0100
+++ ./src/game/variables.hpp    2009-04-21 16:25:39.000000000 +0200
@@ -27,6 +27,8 @@
 
 MACRO_CONFIG_STR(cl_version_server, 100, "version.teeworlds.com", CFGFLAG_CLIENT|CFGFLAG_SAVE, "Server to use to check for new versions")
 
+MACRO_CONFIG_INT(cl_show_srv_msgs, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "")
+
 MACRO_CONFIG_INT(player_use_custom_color, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Toggles usage of custom colors")
 MACRO_CONFIG_INT(player_color_body, 65408, 0, 0, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Player body color")
 MACRO_CONFIG_INT(player_color_feet, 65408, 0, 0, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Player feet color")

7

Re: hide server messages

I belive there is a risk that the forum strips away whitespaces, so the patch posted here might not work.

Used to be very active waay back

8

Re: hide server messages

1 out of 1 hunk failed upload the patchfile to rapidshare.com or something then post the link here, hopefully that will work.

Bye.

9

Re: hide server messages

http://hampelratte.org/zeugs/ignore_srv_msgs.patch.gz