{"id":13337152,"url":"https://github.com/ChillerDragon/teeworlds_network","last_synced_at":"2025-03-11T04:31:41.504Z","repository":{"id":63088972,"uuid":"557282958","full_name":"ChillerDragon/teeworlds_network","owner":"ChillerDragon","description":"A teeworlds 0.7 network protocol library written in ruby","archived":false,"fork":false,"pushed_at":"2024-02-23T04:23:48.000Z","size":464,"stargazers_count":5,"open_issues_count":7,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-30T12:38:49.929Z","etag":null,"topics":["ddnet","ddnet-library","teeworlds","teeworlds-client","teeworlds-library","teeworlds-server"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ChillerDragon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-25T12:07:55.000Z","updated_at":"2024-06-18T05:26:12.374Z","dependencies_parsed_at":"2023-01-22T12:15:52.437Z","dependency_job_id":"78b2c600-d9d4-4336-ae53-2bedf005d2d5","html_url":"https://github.com/ChillerDragon/teeworlds_network","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChillerDragon%2Fteeworlds_network","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChillerDragon%2Fteeworlds_network/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChillerDragon%2Fteeworlds_network/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChillerDragon%2Fteeworlds_network/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChillerDragon","download_url":"https://codeload.github.com/ChillerDragon/teeworlds_network/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242972401,"owners_count":20215196,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ddnet","ddnet-library","teeworlds","teeworlds-client","teeworlds-library","teeworlds-server"],"created_at":"2024-07-29T19:11:13.751Z","updated_at":"2025-03-11T04:31:41.500Z","avatar_url":"https://github.com/ChillerDragon.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# teeworlds_network\nA teeworlds 0.7 client \u0026 server library written in ruby\n\n## Sample\n\nHere a simple sample usage of the library.\nConnecting a client to localhost on port 8303.\nActing as a simple chat bot.\nAlso properly disconnect when the program is killed gracefully.\n\nFor more sample usages checkout the [examples/](examples/) folder.\n\n```ruby\nrequire_relative 'lib/teeworlds_client'\n\nclient = TeeworldsClient.new(verbose: false)\n\nclient.on_chat do |_, msg|\n  # note use `next` instead of `return` in the block\n  next unless msg.message[0] == '!'\n\n  case msg.message[1..]\n  when 'ping' then client.send_chat('pong')\n  when 'whoami' then client.send_chat(\"You are: #{msg.author.name}\")\n  when 'list' then client.send_chat(client.game_client.players.values.map(\u0026:name).join(', '))\n  else client.send_chat('Unknown command! Commands: !ping, !whoami, !list')\n  end\nend\n\n# properly disconnect on ctrl+c\nSignal.trap('INT') do\n  client.disconnect\nend\n\n# connect to localhost and block the current thread\nclient.connect('localhost', 8303, detach: false)\n```\n\n## Documentation\n\nCheckout [docs/README.md](docs/README.md) for a full library documentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FChillerDragon%2Fteeworlds_network","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FChillerDragon%2Fteeworlds_network","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FChillerDragon%2Fteeworlds_network/lists"}