Module: Botfly
- Defined in:
- lib/botfly/matcher/body_matcher.rb,
lib/botfly.rb,
lib/botfly/bot.rb,
lib/botfly/muc_client.rb,
lib/botfly/matcher/matcher.rb,
lib/botfly/callback_context.rb,
lib/botfly/responder/responder.rb,
lib/botfly/matcher/nick_matcher.rb,
lib/botfly/common_block_acceptor.rb,
lib/botfly/matcher/subject_matcher.rb,
lib/botfly/responder/muc_responder.rb,
lib/botfly/matcher/muc_nick_matcher.rb,
lib/botfly/matcher/muc_text_matcher.rb,
lib/botfly/matcher/muc_time_matcher.rb,
lib/botfly/responder/message_responder.rb,
lib/botfly/responder/common_responder_methods.rb,
lib/botfly/responder/subscription_request_responder.rb
Overview
FIXME: Make time matching much more robust
Defined Under Namespace
Modules: CommonResponderMethods Classes: BodyMatcher, Bot, CallbackContext, CommonBlockAcceptor, MUCClient, MUCNickMatcher, MUCResponder, MUCTextMatcher, MUCTimeMatcher, Matcher, MessageResponder, NickMatcher, Responder, SubjectMatcher, SubscriptionRequestResponder
Constant Summary collapse
- FromMatcher =
NickMatcher
- MUCFromMatcher =
MUCNickMatcher
- MUCBodyMatcher =
MUCTextMatcher
Class Method Summary collapse
Class Method Details
.logger ⇒ Object
26 27 28 29 |
# File 'lib/botfly.rb', line 26 def Botfly.logger @logger ||= Logger.new(@logfile) return @logger end |
.login(jid, pass, opts = {}, logfile = STDOUT, &block) ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'lib/botfly.rb', line 30 def Botfly.login(jid,pass,opts={},logfile=STDOUT,&block) @logfile = logfile Botfly.logger.info("BOTFLY: #login") bot = Botfly::Bot.new(jid,pass,opts) bot.connect # Must connect first, since MUC requires an active connection to initiate bot.instance_exec(&block) return bot # At this point doesn't get returned, as the thread is stopped end |