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