class SBCP::RCON
Public Class Methods
new(port, pass)
click to toggle source
# File lib/sbcp/rcon.rb, line 23 def initialize(port, pass) original_verbosity = $VERBOSE $VERBOSE = nil SteamSocket.timeout = 100 @rcon = SourceServer.new("127.0.0.1:#{port}") @rcon.rcon_auth(pass) $VERBOSE = original_verbosity end
Public Instance Methods
execute(command)
click to toggle source
# File lib/sbcp/rcon.rb, line 32 def execute(command) # We swallow the time out exception here because Steam Condenser expects a reply # Starbound doesn't seem to always give a reply, even though the commands work begin @rcon.rcon_exec(command) rescue Exception end end