def __init__(self, *args, **kwargs): ActionListener.__init__(self, *args, **kwargs) self.listen_port = int(self.controller.getConfig('github', 'listen')) self.enabled = int(self.controller.getConfig('github', 'enabled')) print "Initializing GitHub Hook Server... listening on %d" % self.listen_port resource = GithubHookHandler(self) factory = Site(resource) reactor.listenTCP(self.listen_port, factory) self.hook("!github", self.github_command_handler)
def __init__(self, *args, **kwargs): ActionListener.__init__(self, *args, **kwargs) self.hook('!facebook', self.login) self.hook('!check', self.check_notifications) self.hook('!status', self.set_status) self.hook('!feed', self.watch_newsfeed) self.fb = {} # Store an instance of Facebook for each user who asks to connect self.session = {} self.newsfeed= {} # Store the newsfeed functions, None means newsfeed monitoring is Off stored_session = self.controller.unshelve('facebook-sessions') if stored_session: self.session = stored_session for user, session in stored_session.items(): self.fb[user] = facebook.Facebook('5496c69964cb75fb3014c5112d22c31a', '63b189430aefa9404e13e8ee4a874467') self.fb[user].secret = session['secret'] self.fb[user].session_key = session['session_key'] self.newsfeed[user] = None
def __init__(self, *args, **kwargs): ActionListener.__init__(self, *args, **kwargs) self.active = False self.feeds = [] self.entries = {} self.keywords = {} self.conversation = [] self.hook('!rss', self.rss ) self.listen(('privmsg', self.scrape_message)) self.links = None # self.controller.unshelve('rss-links') if not self.links: self.links = [] self.update_feeds_loop = LoopingCall(self._update_feeds) self.update_feeds_loop.start(30) self.suggest_link_loop = LoopingCall(self._suggest_link) self.suggest_link_loop.start(10)
def __init__(self, *args, **kwargs): ActionListener.__init__(self, *args, **kwargs) self.hook('!twitter', self.query_twitter)
def __init__(self, *args, **kwargs): ActionListener.__init__(self, *args, **kwargs) self.hook('!op', self.auto_op_handler)
def __init__(self, *args, **kwargs): ActionListener.__init__(self, *args, **kwargs) self.hook('!log', self.log_command_handler) self.hook('!logger', self.log_command_handler)