0.0
No release in over a year
The ruby gem to find and retrieve information of Warcraft3 games
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 2.0
>= 10.0
>= 3.0
 Project Readme

wc3_protocol

Gem downloads License: MIT

The ruby gem to find and retrieve information of Warcraft3 games on LAN

Contents

  • Usage
  • Installation
  • Documentation
  • Contributing

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.