Turn error into warning

This commit is contained in:
ChillerDragon 2024-01-21 15:32:22 +08:00
parent 2ba05193c5
commit f189b2050e

View file

@ -199,8 +199,13 @@ class TeeworldsServer
# TODO: turn this into a silent return # TODO: turn this into a silent return
# otherwise bad actors can easily trigger this # otherwise bad actors can easily trigger this
# with handcrafted packets # with handcrafted packets
puts 'Error: got client packet from unknown client' #
exit 1 # This is currently triggerd by ddnet TKEN packets
# we should handle those correctly somewhere else i think
# if this warning does not show up anymore it can be removed
p packet
puts 'Warning: got client packet from unknown client'
return
end end
chunks = BigChungusTheChunkGetter.get_chunks(packet.payload) chunks = BigChungusTheChunkGetter.get_chunks(packet.payload)
chunks.each do |chunk| chunks.each do |chunk|