Project

hldsrcon

0.0
No commit activity in last 3 years
No release in over 3 years
Hldsrcon execute command in Counter-Strike 1.6 Server console.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.11
~> 10.0
 Project Readme

Hldsrcon

Hldsrcon gem is Counter-Strike 1.6 Server remote console, the gem use UDP Socket to send and receive data or to execute Counter-Strike 1.6 Server command and receive respons from Server.

Installation

Add this line to your application's Gemfile:

gem 'hldsrcon'

And then execute:

$ bundle

Or install it yourself as:

$ gem install hldsrcon

Usage

To use this game you have first to installet the gem. Use this example, create new ruby file rcon.rb and put this in it:

require 'hldsrcon'

@conn = RconHlds.new("192.168.0.1", 27015, 29015)
@conn.rcon_pass('ctx')
rcon = @conn.rcon_command('sv_restart 1')
puts rcon

Note 'ctx' is the Counter-Strike 1.6 Server rcon_password. After this run the rcon.rb file in terminal, make sure that your terminal directory is where the file is located and after this run ruby rcon.rb. If everything go well you should get respons from server like this:

L 04/24/2016 - 10:04:21: Server cvar "sv_restart" = "1" 

If you get:

Bad Rcon 

Your Counter-Strike 1.6 Server rcon_password is wrong.

License

The gem is available as open source under the terms of the MIT License.