Class: GoldSrcServer
- Inherits:
-
Object
- Object
- GoldSrcServer
- Includes:
- GameServer
- Defined in:
- lib/steam/servers/goldsrc_server.rb
Constant Summary
Constants included from GameServer
GameServer::REQUEST_CHALLENGE, GameServer::REQUEST_INFO, GameServer::REQUEST_PLAYER, GameServer::REQUEST_RULES
Instance Method Summary collapse
-
#init_socket ⇒ Object
Initializes the socket to communicate with the GoldSrc server.
-
#initialize(address, port = 27015, is_hltv = false) ⇒ GoldSrcServer
constructor
A new instance of GoldSrcServer.
- #rcon_auth(password) ⇒ Object
- #rcon_exec(command) ⇒ Object
Methods included from GameServer
#handle_response_for_request, #init, #ping, player_status_attributes, #players, #rcon_authenticated?, #rules, #server_info, split_player_status, #to_s, #update_challenge_number, #update_ping, #update_player_info, #update_rules_info, #update_server_info
Methods included from Server
Constructor Details
#initialize(address, port = 27015, is_hltv = false) ⇒ GoldSrcServer
Returns a new instance of GoldSrcServer.
13 14 15 16 17 |
# File 'lib/steam/servers/goldsrc_server.rb', line 13 def initialize(address, port = 27015, is_hltv = false) super address, port @is_hltv = is_hltv end |
Instance Method Details
#init_socket ⇒ Object
Initializes the socket to communicate with the GoldSrc server
20 21 22 |
# File 'lib/steam/servers/goldsrc_server.rb', line 20 def init_socket @socket = GoldSrcSocket.new @ip_address, @port, @is_hltv end |
#rcon_auth(password) ⇒ Object
24 25 26 27 |
# File 'lib/steam/servers/goldsrc_server.rb', line 24 def rcon_auth(password) @rcon_password = password true end |
#rcon_exec(command) ⇒ Object
29 30 31 |
# File 'lib/steam/servers/goldsrc_server.rb', line 29 def rcon_exec(command) @socket.rcon_exec(@rcon_password, command).strip end |