2022-11-08 15:20:46 +00:00
|
|
|
#!/usr/bin/env ruby
|
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2022-11-09 07:40:17 +00:00
|
|
|
require_relative 'lib/teeworlds_server'
|
2022-11-08 15:20:46 +00:00
|
|
|
|
2022-11-13 09:42:49 +00:00
|
|
|
srv = TeeworldsServer.new(verbose: false)
|
2024-01-20 13:39:21 +00:00
|
|
|
|
|
|
|
srv.on_chat do |context, msg|
|
|
|
|
context.cancel
|
|
|
|
|
|
|
|
puts "[chat] #{msg.author.name}: #{msg.message}"
|
|
|
|
end
|
|
|
|
|
2024-01-20 13:50:55 +00:00
|
|
|
srv.run('127.0.0.1', 8303, detach: false)
|