Do not crash server on emotes

This commit is contained in:
ChillerDragon 2022-11-13 15:54:27 +01:00
parent 41b5277613
commit 26fa55c428
2 changed files with 6 additions and 0 deletions

View file

@ -23,6 +23,11 @@ class GameServer
)
end
def on_emoticon(chunk, packet)
# TODO: generate ClEmoticon using
# twgen g ClEmoticon emoticon:int
end
def on_info(chunk, packet)
u = Unpacker.new(chunk.data[1..])
net_version = u.get_string

View file

@ -105,6 +105,7 @@ class TeeworldsServer
case chunk.msg
when NETMSGTYPE_CL_STARTINFO then @game_server.on_start_info(chunk, packet)
when NETMSGTYPE_CL_SAY then @game_server.on_say(chunk, packet)
when NETMSGTYPE_CL_EMOTICON then @game_server.on_emoticon(chunk, packet)
else
puts "Unsupported game msg: #{chunk.msg}"
exit(1)