Sha256: 95327df4296a662b149905ed8dddbd119a0bd28f8f30cefa604f3c3689b883bd

Contents?: true

Size: 463 Bytes

Versions: 8

Compression:

Stored size: 463 Bytes

Contents

require 'botfly/matcher'

# Msg: body, chat_state, subject, type (:chat, :error, :groupchat, :headline, :normal)
module Botfly
  class NickMatcher < Matcher
    def match(params)
      msg = params[:message]
      Botfly.logger.debug "MCH: Matching #{@condition.inspect} against #{msg.from.inspect}"
      Botfly.logger.debug "RESULT: #{(msg.from.node =~ @condition).inspect}"
      return msg.from.node =~ @condition
    end
  end
  FromMatcher = NickMatcher
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
botfly-0.3.6 lib/botfly/matcher/nick_matcher.rb
botfly-0.3.5 lib/botfly/matcher/nick_matcher.rb
botfly-0.3.4 lib/botfly/matcher/nick_matcher.rb
botfly-0.3.3 lib/botfly/matcher/nick_matcher.rb
botfly-0.3.2 lib/botfly/matcher/nick_matcher.rb
botfly-0.3.1 lib/botfly/matcher/nick_matcher.rb
botfly-0.3.0 lib/botfly/matcher/nick_matcher.rb
botfly-0.2.1 lib/botfly/matcher/nick_matcher.rb