ChillerDragon
6c005497d4
Thus closed #5 By deciding to support server as well. This is rebranding from teeworlds-client to teeworlds_network And thus also including a bunch of file renames
18 lines
366 B
Ruby
Executable file
18 lines
366 B
Ruby
Executable file
#!/usr/bin/env ruby
|
|
# frozen_string_literal: true
|
|
|
|
# Chat spamming client
|
|
|
|
require_relative '../lib/teeworlds_client'
|
|
|
|
client = TeeworldsClient.new(verbose: true)
|
|
|
|
# connect to localhost and detach a background thread
|
|
client.connect('localhost', 8303, detach: true)
|
|
|
|
loop do
|
|
# send a chat message every 5 seconds
|
|
sleep 5
|
|
client.send_chat('hello friends!')
|
|
end
|