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