Class: ModSpox::Handlers::Bounce

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

Instance Method Summary collapse

Constructor Details

#initialize(handlers) ⇒ Bounce

Returns a new instance of Bounce.



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

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

Instance Method Details

#process(string) ⇒ Object



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

def process(string)
    if(string =~ /:Try server (\S+), port (.+)$/)
        return Messages::Incoming::Bounce.new(string, $1, $2)
    end
end