Module: RuneRb::Network::RS317::ButtonClickMessage

Includes:
System::Log
Defined in:
app/network/protocol/rs317/incoming/button.rb

Overview

Since:

  • 0.9.3

Instance Method Summary collapse

Methods included from System::Log

#class_name, #err, #err!, #log, #log!, #symbolize_file

Instance Method Details

#parse(context) ⇒ Object

Parses the ButtonClickMessage

Parameters:

Since:

  • 0.9.3


6
7
8
9
10
11
12
13
# File 'app/network/protocol/rs317/incoming/button.rb', line 6

def parse(context)
  id = read_short
  case id
  when 2458 then context.logout
  when 3651 then context.session.write_message(:ClearInterfacesMessage)
  else err "Unhandled button! ID: #{id}"
  end
end