Sha256: bbafff8f54d845a2a15e80e50fbce96b3f882a9c62d36d6a5566ba04b46a1edf
Contents?: true
Size: 449 Bytes
Versions: 2
Compression:
Stored size: 449 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 end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
botfly-0.1.1 | lib/botfly/matcher/nick_matcher.rb |
botfly-0.1.0 | lib/botfly/matcher/nick_matcher.rb |