Print rcon commands sent by the client
This commit is contained in:
parent
11898d0f41
commit
6d7bd0371d
|
@ -63,6 +63,12 @@ class GameServer
|
|||
@server.send_game_info(packet.client, GameInfo.new.to_a)
|
||||
end
|
||||
|
||||
def on_rcon_cmd(chunk, packet)
|
||||
u = Unpacker.new(chunk.data[1..])
|
||||
cmd = u.get_string
|
||||
puts "got rcon_cmd=#{cmd}"
|
||||
end
|
||||
|
||||
def on_input(chunk, packet)
|
||||
# vanilla server responds to input with 2 chunks
|
||||
# - input_timing
|
||||
|
|
|
@ -106,6 +106,8 @@ class TeeworldsServer
|
|||
@game_server.on_enter_game(chunk, packet)
|
||||
when NETMSG_INPUT
|
||||
@game_server.on_input(chunk, packet)
|
||||
when NETMSG_RCON_CMD
|
||||
@game_server.on_rcon_cmd(chunk, packet)
|
||||
else
|
||||
puts "Unsupported system msg: #{chunk.msg}"
|
||||
exit(1)
|
||||
|
|
Loading…
Reference in a new issue