Skip to content

Commit de5a403

Browse files
committed
Do not crash on ddnet ex messages
1 parent 8324f8b commit de5a403

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/teeworlds_server.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ def on_message(chunk, packet)
162162
when NETMSGTYPE_CL_STARTINFO then @game_server.on_start_info(chunk, packet)
163163
when NETMSGTYPE_CL_SAY then @game_server.on_say(chunk, packet)
164164
when NETMSGTYPE_CL_EMOTICON then @game_server.on_emoticon(chunk, packet)
165+
when NETMSG_NULL then nil # TODO: ddnet ex messages
165166
else
166167
puts "Unsupported game msg: #{chunk.msg}"
167168
exit(1)
@@ -187,6 +188,8 @@ def process_chunk(chunk, packet)
187188
@game_server.on_rcon_cmd(chunk, packet)
188189
when NETMSG_RCON_AUTH
189190
@game_server.on_rcon_auth(chunk, packet)
191+
when NETSMSG_NULL
192+
nil # TODO: ddnet ex messages
190193
else
191194
puts "Unsupported system msg: #{chunk.msg}"
192195
exit(1)

0 commit comments

Comments
 (0)