Class: RCONGoldSrcRequest

Inherits:
Object
  • Object
show all
Includes:
SteamPacket
Defined in:
lib/steam/packets/rcon/rcon_goldsrc_request.rb

Overview

This packet class represents a RCON request packet sent to a GoldSrc server

It is used to request a command execution on the server.

See Also:

Author:

  • Sebastian Staudt

Constant Summary

Constants included from SteamPacket

SteamPacket::A2M_GET_SERVERS_BATCH2_HEADER, SteamPacket::A2S_INFO_HEADER, SteamPacket::A2S_PLAYER_HEADER, SteamPacket::A2S_RULES_HEADER, SteamPacket::A2S_SERVERQUERY_GETCHALLENGE_HEADER, SteamPacket::C2M_CHECKMD5_HEADER, SteamPacket::M2A_SERVER_BATCH_HEADER, SteamPacket::M2C_ISVALIDMD5_HEADER, SteamPacket::M2S_REQUESTRESTART_HEADER, SteamPacket::RCON_GOLDSRC_CHALLENGE_HEADER, SteamPacket::RCON_GOLDSRC_NO_CHALLENGE_HEADER, SteamPacket::RCON_GOLDSRC_RESPONSE_HEADER, SteamPacket::S2A_INFO2_HEADER, SteamPacket::S2A_INFO_DETAILED_HEADER, SteamPacket::S2A_LOGSTRING_HEADER, SteamPacket::S2A_PLAYER_HEADER, SteamPacket::S2A_RULES_HEADER, SteamPacket::S2C_CHALLENGE_HEADER, SteamPacket::S2C_CONNREJECT_HEADER, SteamPacket::S2M_HEARTBEAT2_HEADER

Instance Method Summary collapse

Constructor Details

#initialize(request) ⇒ RCONGoldSrcRequest

Creates a request for the given request string

The request string has the form ‘rcon number password command`.

Parameters:

  • request (String)

    The request string to send to the server



24
25
26
# File 'lib/steam/packets/rcon/rcon_goldsrc_request.rb', line 24

def initialize(request)
  super 0x00, request
end

Instance Method Details

#to_sString

Returns the raw data representing this packet

Returns:

  • (String)

    A string containing the raw data of this request packet



31
32
33
# File 'lib/steam/packets/rcon/rcon_goldsrc_request.rb', line 31

def to_s
  [0xFFFFFFFF, @content_data.string].pack('Va*')
end