Class: SteamCondenser::Servers::Packets::A2S_RULES_Packet

Inherits:
Object
  • Object
show all
Includes:
BasePacket, RequestWithChallenge
Defined in:
lib/steam-condenser/servers/packets/a2s_rules_packet.rb

Overview

This packet class represents a A2S_RULES request send to a game server

The game server will return a list of currently active game rules, e.g. mp_friendlyfire = 1.

This packet type requires the client to challenge the server in advance, which is done automatically if required.

See Also:

  • GameServer#update_rules_info

Author:

  • Sebastian Staudt

Constant Summary

Constants included from BasePacket

BasePacket::A2M_GET_SERVERS_BATCH2_HEADER, BasePacket::A2S_INFO_HEADER, BasePacket::A2S_PLAYER_HEADER, BasePacket::A2S_RULES_HEADER, BasePacket::A2S_SERVERQUERY_GETCHALLENGE_HEADER, BasePacket::C2M_CHECKMD5_HEADER, BasePacket::M2A_SERVER_BATCH_HEADER, BasePacket::RCON_GOLDSRC_CHALLENGE_HEADER, BasePacket::RCON_GOLDSRC_NO_CHALLENGE_HEADER, BasePacket::RCON_GOLDSRC_RESPONSE_HEADER, BasePacket::S2A_INFO2_HEADER, BasePacket::S2A_INFO_DETAILED_HEADER, BasePacket::S2A_PLAYER_HEADER, BasePacket::S2A_RULES_HEADER, BasePacket::S2C_CHALLENGE_HEADER, BasePacket::S2C_CONNREJECT_HEADER

Instance Method Summary collapse

Methods included from RequestWithChallenge

#to_s

Methods included from BasePacket

#to_s

Constructor Details

#initialize(challenge_number = -1)) ⇒ A2S_RULES_Packet

Creates a new A2S_RULES request object including the challenge number

Parameters:

  • challenge_number (Numeric) (defaults to: -1))

    The challenge number received from the server


30
31
32
# File 'lib/steam-condenser/servers/packets/a2s_rules_packet.rb', line 30

def initialize(challenge_number = -1)
  super A2S_RULES_HEADER, challenge_number
end