Class: ModSpox::Handlers::LuserChannels

Inherits:
Handler
  • Object
show all
Defined in:
lib/mod_spox/handlers/LuserChannels.rb

Instance Method Summary collapse

Methods inherited from Handler

#preprocess

Constructor Details

#initialize(handlers) ⇒ LuserChannels

Returns a new instance of 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