Class: ModSpox::Handlers::LuserChannels
- Defined in:
- lib/mod_spox/handlers/LuserChannels.rb
Instance Method Summary collapse
-
#initialize(handlers) ⇒ LuserChannels
constructor
A new instance of LuserChannels.
- #process(string) ⇒ Object
Methods inherited from Handler
Constructor Details
#initialize(handlers) ⇒ LuserChannels
5 6 7 |
# File 'lib/mod_spox/handlers/LuserChannels.rb', line 5 def initialize(handlers) handlers[RPL_LUSERCHANNELS] = self end |
Instance Method Details
#process(string) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/mod_spox/handlers/LuserChannels.rb', line 8 def process(string) if(string =~ /(\d+)\s:channels/) return Messages::Incoming::LuserChannels.new(string, $1.to_i) else Logger.warn('Failed to match RPL_LUSERCHANNELS message') return nil end end |