diff --git a/lib/game_server.rb b/lib/game_server.rb index 8e23f7a..be54b06 100644 --- a/lib/game_server.rb +++ b/lib/game_server.rb @@ -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 diff --git a/lib/teeworlds_server.rb b/lib/teeworlds_server.rb index f63081b..d610b51 100644 --- a/lib/teeworlds_server.rb +++ b/lib/teeworlds_server.rb @@ -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)