teeworlds_network/integration_test/server/chat.rb

15 lines
300 B
Ruby
Raw Permalink Normal View History

2024-01-23 14:00:31 +00:00
#!/usr/bin/env ruby
# frozen_string_literal: true
require_relative '../../lib/teeworlds_server'
server = TeeworldsServer.new(verbose: false)
server.on_chat do |context, chat_msg|
context.cancel
puts "[testchat] #{chat_msg.author.name}: #{chat_msg.message}"
end
server.run('127.0.0.1', 8377)