Class: Australium::PlayerConnect

Inherits:
Event
  • Object
show all
Defined in:
lib/australium/events/player_connect.rb

Constant Summary collapse

LOG_REGEX =
/"(?<player>.+)" connected, address "(?<address>.+)"/

Constants inherited from Event

Event::PROPERTY_REGEX, Event::TIMESTAMP_REGEX

Instance Attribute Summary collapse

Attributes inherited from Event

#raw

Instance Method Summary collapse

Methods inherited from Event

inherited, #to_s

Constructor Details

#initialize(data) ⇒ PlayerConnect

Returns a new instance of PlayerConnect.



11
12
13
14
# File 'lib/australium/events/player_connect.rb', line 11

def initialize(data)
  super(data)
  player.address = address
end

Instance Attribute Details

#addressString

Returns the IP address of the connecting player.

Returns:

  • (String)

    the IP address of the connecting player.



11
12
13
14
# File 'lib/australium/events/player_connect.rb', line 11

def initialize(data)
  super(data)
  player.address = address
end

#playerPlayer

Returns the Australium::Player who connected to the server.

Returns:



11
12
13
14
# File 'lib/australium/events/player_connect.rb', line 11

def initialize(data)
  super(data)
  player.address = address
end