Opsi mixup in example (i should start testing those)

This commit is contained in:
ChillerDragon 2022-11-05 12:00:49 +01:00
parent db106ba70e
commit 3810a333f7

View file

@ -5,14 +5,14 @@ require_relative '../lib/teeworlds-client'
client = TeeworldsClient.new
client.on_client_info do |ctx|
unless ctx.data[:silent]
reason = ctx.data[:reason] ? " (#{ctx.data[:reason]})" : ''
puts "'#{ctx.data[:player].name}' joined the game#{reason}"
end
puts "'#{ctx.data[:player].name}' joined the game#{reason}"
end
client.on_client_drop do |ctx|
puts "'#{ctx.data[:player].name}' has left the game"
unless ctx.data[:silent]
reason = ctx.data[:reason] ? " (#{ctx.data[:reason]})" : ''
puts "'#{ctx.data[:player].name}' left the game#{reason}"
end
end
Signal.trap('INT') do