def __init__(self, irc): global instance super(Taiga, self).__init__(irc) instance = self callback = TaigaWebHookService(self, irc) httpserver.hook('taiga', callback)
def __init__(self, irc): global instance super(Gogs, self).__init__(irc) instance = self callback = GogsWebHookService(self, irc) httpserver.hook('gogs', callback)
def __init__(self, irc): global instance super(Gitlab, self).__init__(irc) instance = self callback = GitlabWebHookService(self, irc) httpserver.hook('gitlab', callback)
def __init__(self, irc): self.__parent = super(Glob2Chan, self) callbacks.Plugin.__init__(self, irc) callback = Glob2ChanCallback() callback.plugin = self httpserver.hook('glob2', callback) self._users = {}
def __init__(self, irc): global instance self.__parent = super(Gogs, self) self.__parent.__init__(irc) instance = self callback = GogsWebHookService(self) httpserver.hook('gogs', callback)
def __init__(self, irc): self.__parent = super(LimnoriaChan, self) self.__parent.__init__( irc) callback = LimnoriaDebBuildsCallback() callback.plugin = self httpserver.hook('limnoria_debian_builds', callback) self._users = {}
def __init__(self, irc): global instance self.__parent = super(Wekan, self) self.__parent.__init__(irc) instance = self callback = WekanWebHookService(self) httpserver.hook('wekan', callback)
def __init__(self, irc): global instance self.__parent = super(GitHub, self) callbacks.Plugin.__init__(self, irc) instance = self callback = GithubCallback() callback.plugin = self httpserver.hook('github', callback)
def __init__(self, irc): self.__parent = super(Herald, self) callbacks.Plugin.__init__(self, irc) self.irc = irc callback = HeraldServerCallback() # Insert callbacks.Plugin into the ole httpservercallback class callback.plugin = self httpserver.hook('herald', callback)
def __init__(self, irc): global instance self.__parent = super(Website, self) callbacks.Plugin.__init__(self, irc) instance = self callback = WebsiteCallback() callback.plugin = self httpserver.hook('website', callback)
def __init__(self, irc): global instance self.__parent = super(Realhook, self) callbacks.Plugin.__init__(self, irc) instance = self callback = RealhookCallback() callback.plugin = self httpserver.hook('realhook', callback)
def __init__(self, irc): self.__parent = super(ShortURLService, self) callbacks.Plugin.__init__(self, irc) self.db = ShortURLServiceDB() callback = ShortURLServiceCallback() callback.plugin = self callback.db = self.db httpserver.hook('S', callback)
def __init__(self, irc): # Some stuff needed by Supybot self.__parent = super(WebLogs, self) callbacks.Plugin.__init__(self, irc) self.lastStates = {} # registering the callback callback = WebLogsServerCallback() # create an instance of the callback httpserver.hook('weblogs', callback)
def __init__(self, irc): self.__parent = super(WebHooks, self) self.__parent.__init__(irc) # webhook. callback = WebHooksServiceCallback(self) callback.plugin = self httpserver.hook('webhooks', callback) # db. self._webhooks = defaultdict(set) self._loadpickle() # load saved data.
def __init__(self, irc): global instance # Store the super() information so that reloads don't fail self.__parent = super(Gitlab, self) self.__parent.__init__(irc) instance = self callback = GitlabWebHookService(self) httpserver.hook('gitlab', callback)
def __init__(self, irc): self.__parent = super(WebStats, self) callbacks.Plugin.__init__(self, irc) self.lastmsg = {} self.ircstates = {} self.db = WebStatsDB() callback = WebStatsServerCallback() callback.plugin = self callback.db = self.db httpserver.hook('webstats', callback)
def __init__(self, irc): self.__parent = super(WebStats, self) callbacks.Plugin.__init__(self, irc) self.lastmsg = {} self.ircstates = {} self.db = WebStatsDB() callback = WebStatsServerCallback() callback.plugin = self callback.db = self.db httpserver.hook("webstats", callback)
def __init__(self, irc): # Some stuff needed by Supybot self.__parent = super(WebLogs, self) callbacks.Plugin.__init__(self, irc) self.lastStates = {} WebLogsMiddleware._plugin = self # registering the callback callback = WebLogsServerCallback( ) # create an instance of the callback httpserver.hook('weblogs', callback)
def __init__(self, irc): # Some stuff needed by Supybot global instance self.__parent = super(MsgServer, self) instance = self callbacks.Plugin.__init__(self, irc) # registering the callback callback = ServerCallback() # create an instance of the callback callback.plugin = self httpserver.hook("msgserver", callback) # register the callback at `/msgserver` for cb in self.cbs: cb.plugin = self
def __init__(self, irc): global instance self.__parent = super(GitHub, self) callbacks.Plugin.__init__(self, irc) instance = self callback = GithubCallback() callback.plugin = self httpserver.hook('github', callback) for cb in self.cbs: cb.plugin = self if 'reply_env' not in ircmsgs.IrcMsg.__slots__: log.error("Your version of Supybot is not compatible with " "reply environments. So, the GitHub plugin won't " "be able to announce events from GitHub.")
def _startHttp(self): callback = ChannelStatusCallback() callback._plugin = self httpserver.hook('channelstatus', callback) self._http_running = True
def __init__(self, irc): self.__parent = super(IcingaNotifier, self) self.__parent.__init__(irc) callback = IcingaCallback() httpserver.hook('icinga', callback)
def __init__(self, irc): self.__parent = super(WebDoc, self) callbacks.Plugin.__init__(self, irc) callback = WebDocServerCallback(self, irc) httpserver.hook('plugindoc', callback)
def _startHttp(self): callback = FactoidsCallback() callback._plugin = self httpserver.hook('factoids', callback) self._http_running = True
def __init__(self, irc): self.__parent = super(WebLogsS3, self) callbacks.Plugin.__init__(self, irc) httpserver.hook("weblogs", WebLogsS3Callback())
def _startHttp(self): callback = FediverseHttp() callback._plugin = self httpserver.hook("fediverse", callback)
def _startHttp(self): callback = AkaHTTPCallback() callback._plugin = self httpserver.hook('aka', callback) self._http_running = True
def __init__(self, irc): self.__parent = super(GitHub, self) callbacks.Plugin.__init__(self, irc) httpserver.hook("github", GitHubCallback())
def __init__(self, irc): self.__parent = super(DropboxWatch, self) self.__parent.__init__(irc) callback = DropboxWatchServerCallback() self._abbrev = DropboxWatchServerCallback.name.lower() for server in httpserver.http_servers: if self._abbrev in server.callbacks: httpserver.unhook(self._abbrev) break httpserver.hook(self._abbrev, callback) interval = conf.supybot.plugins.DropboxWatch.interval() def f(): if events.empty(): return path_dict = dict() for channel in irc.state.channels: paths = conf.supybot.plugins.DropboxWatch.paths.get(channel)() if len(paths) == 0: continue for path in paths: if path in path_dict: continue path_dict[path] = (set(), set()) try: while not events.empty(): event = events.get_nowait() for path in path_dict.keys(): if event[1].startswith('/' + path): updates, deletes = path_dict[path] if event[0] == EventType.delete: deletes.add(event[1]) else: updates.add(event[1]) path_dict[path] = (updates, deletes) except Queue.Empty: log.warning('Queue empty') for k in path_dict.keys(): updates, deletes = path_dict[k] output = '' if len(deletes) > 0: output = 'Deleted: %s' % (', '.join(deletes)) if len(updates) > 0: if len(output) > 0: output += ' | ' output += 'Updated: %s' % (', '.join(updates)) if len(output) == 0: continue output = '[Dropbox] %s' % output for chan in irc.state.channels: paths = conf.supybot.plugins.DropboxWatch.paths.get(chan)() if len(paths) == 0 or k not in paths: continue log.info('%s >> %s' % (chan, output)) irc.queueMsg(ircmsgs.privmsg(chan, output)) if self._abbrev in schedule.schedule.events: schedule.removeEvent(self._abbrev) schedule.addPeriodicEvent(f, interval, name=self._abbrev, now=False)