Class: ModSpox::Handlers::LuserOp

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

Instance Method Summary collapse

Constructor Details

#initialize(handlers) ⇒ LuserOp

Returns a new instance of LuserOp.



4
5
6
# File 'lib/mod_spox/handlers/LuserOp.rb', line 4

def initialize(handlers)
    handlers[RPL_LUSEROP] = self
end

Instance Method Details

#process(string) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/mod_spox/handlers/LuserOp.rb', line 7

def process(string)
    if(string =~ /(\d+) :.*?\s*[oO]perators/)
        return Messages::Incoming::LuserOp.new(string, $1.to_i)
    else
        Logger.log('Failed to match RPL_LUSEROP message')
    end
end