Skip to content

magynhard/wc3_protocol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wc3_protocol

Gem downloads License: MIT

The ruby gem to find and retrieve information of Warcraft3 games

Contents

Usage

Find games in LAN

require 'wc3_protocol'

# examples with explicit default parameters
games = Wc3Protocol::Broadcast.find_games port: 6112, version: '1.27', game_type: 'TFT'
# => [Wc3Protocol::ServerInfo, Wc3Protocol::ServerInfo, ...]

games.each do |g|
  puts "=================================================="
  puts "Found game on #{g.remote_address}:#{g.remote_port}"
  puts
  puts "Type: #{g.game_type}"
  puts "Version: #{g.game_version}"
  puts "Name: #{g.name}"
  puts "Map: #{g.map_name}"
  puts "Players: #{g.taken_slots}/#{g.max_slots}"
  puts
  # =================================================="
  # Found game on 192.168.178.20:6112"
  # 
  # Type: The Frozen Throne
  # Version: 1.27
  # Name: Local game (SuperPlayer)
  # Map: (4)Tanaris.w3x
  # Players: 3/4"
  # 
end

Installation

Add this line to your application's Gemfile:

gem 'wc3_protocol'

And then execute:

$ bundle install

Or install it yourself by:

$ gem install wc3_protocol

Documentation

Check out the doc at RubyDoc https://www.rubydoc.info/gems/wc3_protocol

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/magynhard/wc3_protocol. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

About

Warcraft III protocol implementation in Ruby

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published