Class: SteamCondenser::Servers::Packets::S2A_LOGSTRING_Packet

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

Overview

This class represents a S2A_LOGSTRING packet used to transfer log messages

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 Attribute Summary collapse

Instance Method Summary collapse

Methods included from BasePacket

#to_s

Constructor Details

#initialize(data) ⇒ S2A_LOGSTRING_Packet

Creates a new S2A_LOGSTRING object based on the given data


25
26
27
28
29
30
# File 'lib/steam-condenser/servers/packets/s2a_logstring_packet.rb', line 25

def initialize(data)
  super S2A_LOGSTRING_HEADER, data

  @content_data.getbyte
  @message = @content_data.string
end

Instance Attribute Details

#messageString (readonly)

Returns the log message contained in this packet


20
21
22
# File 'lib/steam-condenser/servers/packets/s2a_logstring_packet.rb', line 20

def message
  @message
end