def __init__( self ): Plugin.__init__( self, "M6Replay", "www.m6replay.fr/", 1 ) self.listeFichiers = {} # Clefs = nomChaine, Valeurs = { nomEmission, [ [ Episode 1, Date1, URL1 ], ... ] } if os.path.exists( self.fichierCache ): self.listeFichiers = self.chargerCache()
def __init__( self ): Plugin.__init__( self, "W9Replay", "http://www.w9replay.fr/", 1 ) self.listeEmissionsCourantes = {} if os.path.exists( self.fichierCache ): self.listeFichiers = self.chargerCache()
def __init__(self, connection, eventhandler): Plugin.__init__(self, connection, eventhandler, needs_dir=False) self.eventhandler.get_events()['MessageEvent'].register(self.handler) self.api_url = "http://api.autome.me/text?lines=1"
def __init__(self, connection, eventhandler): Plugin.__init__(self, connection, eventhandler, needs_dir = False) self.eventhandler.get_events()['MessageEvent'].register(self.handler) self.api_url = "http://api.autome.me/text?lines=1"
def __init__(self): Plugin.__init__(self, "W9Replay", "http://www.w9replay.fr/", 1) self.listeEmissionsCourantes = {} if os.path.exists(self.fichierCache): self.listeFichiers = self.chargerCache()
def __init__(self): Plugin.__init__(self, "M6Replay", "www.m6replay.fr/", 1) self.listeFichiers = { } # Clefs = nomChaine, Valeurs = { nomEmission, [ [ Episode 1, Date1, URL1 ], ... ] } if os.path.exists(self.fichierCache): self.listeFichiers = self.chargerCache()
def __init__(self, connection, eventhandler): Plugin.__init__(self, connection, eventhandler, needs_dir = False) self.eventhandler.get_events()['PMEvent'].register(self.handler) self.eventhandler.get_events()['PluginsLoadedEvent'].register(self.load_identification) self.system_event = self.eventhandler.get_events()['SystemEvent']
def __init__(self, connection, eventhandler): Plugin.__init__(self, connection, eventhandler, needs_dir = False) self.helpfactory = self.connection.pluginloader.helpfactory self.eventhandler.get_events()['MessageEvent'].register(self.handler) self.eventhandler.get_events()['PMEvent'].register(self.handler)
def __init__(self, connection, eventhandler): Plugin.__init__(self, connection, eventhandler, needs_dir=False) self.helpfactory = self.connection.pluginloader.helpfactory self.eventhandler.get_events()['MessageEvent'].register(self.handler) self.eventhandler.get_events()['PMEvent'].register(self.handler)
def __init__( self): Plugin.__init__( self, "Europe1", "http://www.europe1.fr", 1 ) # On instancie la classe qui permet de charger les pages web self.listeEmissions = {} # Clef = nom emission ; Valeur = lien fichier XML qui contient la liste des emissions if os.path.exists( self.fichierCache ): self.listeEmissions = self.chargerCache()
def __init__( self ): Plugin.__init__( self, "Canal+", "http://www.canalplus.fr/", 7, "CanalPlus.jpg" ) self.listeProgrammes = {} # { Nom chaine : { Nom emission : ID emission } } self.derniereChaine = "" if os.path.exists( self.fichierCache ): self.listeProgrammes = self.chargerCache()
def __init__(self, connection, eventhandler): Plugin.__init__(self, connection, eventhandler, needs_dir=False) self.eventhandler.get_events()['PMEvent'].register(self.handler) self.eventhandler.get_events()['PluginsLoadedEvent'].register( self.load_identification) self.system_event = self.eventhandler.get_events()['SystemEvent']
def __init__(self, factory): Plugin.__init__(self, factory) self.channel_message_rule = "(.*)" self.trivia_started = {} #Dict with channel name and boolean to see if the trivia is busy on that channel self.questions = {} self.answered = {} self.timers = {} for channel in self.factory.channels: self.trivia_started[channel] = False
def __init__(self): Plugin.__init__(self, "Europe1", "http://www.europe1.fr", 1) # On instancie la classe qui permet de charger les pages web self.listeEmissions = { } # Clef = nom emission ; Valeur = lien fichier XML qui contient la liste des emissions if os.path.exists(self.fichierCache): self.listeEmissions = self.chargerCache()
def __init__(self): Plugin.__init__(self, "Canal+", "http://www.canalplus.fr/", 7, "CanalPlus.jpg") self.listeProgrammes = { } # { Nom chaine : { Nom emission : ID emission } } self.derniereChaine = "" if os.path.exists(self.fichierCache): self.listeProgrammes = self.chargerCache()
def __init__(self, connection, eventhandler): Plugin.__init__(self, connection, eventhandler, needs_dir=True) self.eventhandler.get_events()["PMEvent"].register(self.handler) self.eventhandler.get_events()["SystemEvent"].register(self.sys_handler) self.eventhandler.get_events()["PluginsLoadedEvent"].register(self.sys_handler) self.logins = {} self._opened = False self.__open_shelve__()
def __init__(self, connection, eventhandler): Plugin.__init__(self, connection, eventhandler, needs_dir=False) self.regexp = r"""(?:https?://(?:www.|)youtube.com/(?:watch\?v=([\w-]*)))""" self.pattern = re.compile(self.regexp, re.VERBOSE) self.format = "[%sYou%sTube%s] %s&t%s - %s&a%s" % ( Escapes.YELLOW, Escapes.RED, Escapes.BLACK, Escapes.AQUA, Escapes.BLACK, Escapes.GREY, Escapes.BLACK) self.apiurl = "http://gdata.youtube.com/feeds/api/videos/%s?v=2&alt=jsonc" self.eventhandler.get_events()['MessageEvent'].register(self.handler)
def __init__(self, connection, eventhandler): Plugin.__init__(self, connection, eventhandler, needs_dir=True) self.eventhandler.get_events()['PMEvent'].register(self.handler) self.eventhandler.get_events()['SystemEvent'].register( self.sys_handler) self.eventhandler.get_events()['PluginsLoadedEvent'].register( self.sys_handler) self.logins = {} self._opened = False self.__open_shelve__()
def __init__(self, connection, eventhandler): Plugin.__init__(self, connection, eventhandler, needs_dir = False) # props to John Gruber, http://daringfireball.net/2010/07/improved_regex_for_matching_urls self.regexp = r"""(?i)\b((?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'"\.<>]))""" self.title_regexp = r"""<title>(.*?)</title>""" self.pattern = re.compile(self.regexp, re.VERBOSE) self.title_pattern = re.compile(self.title_regexp, re.VERBOSE | re.DOTALL | re.M) self.alt_title_len = 50 self.format = "[%sURLScraper%s] %s^t^%s - [%s^l^%s]" % (Escapes.GREEN, Escapes.BLACK, Escapes.AQUA, Escapes.BLACK, Escapes.GREY, Escapes.BLACK) self.eventhandler.get_events()['MessageEvent'].register(self.handler)
def __init__(self, connection, eventhandler): Plugin.__init__(self, connection, eventhandler, needs_dir=False) # props to John Gruber, http://daringfireball.net/2010/07/improved_regex_for_matching_urls self.regexp = r"""(?i)\b((?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'"\.<>]))""" self.title_regexp = r"""<title>(.*?)</title>""" self.pattern = re.compile(self.regexp, re.VERBOSE) self.title_pattern = re.compile(self.title_regexp, re.VERBOSE | re.DOTALL | re.M) self.alt_title_len = 50 self.format = "[%sURLScraper%s] %s^t^%s - [%s^l^%s]" % ( Escapes.GREEN, Escapes.BLACK, Escapes.AQUA, Escapes.BLACK, Escapes.GREY, Escapes.BLACK) self.eventhandler.get_events()['MessageEvent'].register(self.handler)
def __init__(self, connection, eventhandler): Plugin.__init__(self, connection, eventhandler, needs_dir=True) HTTPServer.running = False self.config = self.get_plugin_configuration() if len(self.config) == 0: raise Exception( "You must configure options for the HTTP server in your server config!" ) self.resource_path = self.config['resource_path'] if self.resource_path[0] == '/': self.resource_path = self.resource_path[1:] self.resource_path = self.get_path() + self.resource_path self.resource_route = self.config['resource_route'] if self.resource_route[0] == '/': self.resource_route = self.resource_route[1:] if not os.path.exists(self.resource_path): try: os.makedirs(self.resource_path) except (OSError) as e: if e.errno != errno.EEXIST: raise sys.stderr = WSGILoggingHandler() sys.stdout = sys.stderr self.request_handlers = {} self.__thread = None self.__load_layers() self.eventhandler.get_events()['MessageEvent'].register(self.handler) self.eventhandler.get_events()['PluginsLoadedEvent'].register( self.__on_plugins_loaded)
def __init__(self, connection, eventhandler): Plugin.__init__(self, connection, eventhandler, needs_dir = False) self.cache = {} self.eventhandler.get_default_events()['MessageEvent'].register(self.handler) self.eventhandler.get_default_events()['PluginsLoadedEvent'].register(self._load_identification) self.connection.tasks.update({ "UrbanDictionary__scheduled_cache_clean" : self.scheduler.add_interval_job( self.clean_cache, days = 1 ) } ) self.url = "http://api.urbandictionary.com/v0/define?"
def __init__(self, connection, eventhandler): Plugin.__init__(self, connection, eventhandler, needs_dir=False) self.regexp = r"""(?:https?://(?:www.|)youtube.com/(?:watch\?v=([\w-]*)))""" self.pattern = re.compile(self.regexp, re.VERBOSE) self.format = "[%sYou%sTube%s] %s&t%s - %s&a%s" % ( Escapes.YELLOW, Escapes.RED, Escapes.BLACK, Escapes.AQUA, Escapes.BLACK, Escapes.GREY, Escapes.BLACK, ) self.apiurl = "http://gdata.youtube.com/feeds/api/videos/%s?v=2&alt=jsonc" self.eventhandler.get_events()["MessageEvent"].register(self.handler)
def __init__(self, connection, eventhandler): Plugin.__init__(self, connection, eventhandler, needs_dir = False) self.cache = {} self.scheduler = connection.scheduler self.eventhandler.get_default_events()['MessageEvent'].register(self.handler) self.eventhandler.get_default_events()['PluginsLoadedEvent'].register(self._load_identification) self.connection.tasks.update({ "WolframAlpha__scheduled_cache_clean": self.scheduler.add_interval_job( self.clean_cache, days = 1 ) } ) self.appID = "395X7T-8JLXGEP8YH"
def __init__(self, connection, eventhandler): Plugin.__init__(self, connection, eventhandler, needs_dir=True) self.brain = megahal.MegaHAL(brainfile=self.get_path() + "/brain") self.scheduler = connection.scheduler self.eventhandler.get_events()['MessageEvent'].register(self.handler) self.eventhandler.get_events()['PluginsLoadedEvent'].register( self._load_identification) self.ignored = [] # chance (out of 100) that the AI will respond (per-channel). self.response_chances = {} self.default_chance = 30 self.connection.tasks.update({ "ArtificialIntelligence__scheduled_sync": self.scheduler.add_interval_job(self.sync, minutes=30) })
def __init__(self, connection, eventhandler): Plugin.__init__(self, connection, eventhandler, needs_dir = False) self.cache = {} self.scheduler = connection.scheduler self.eventhandler.get_events()['MessageEvent'].register(self.handler) self.eventhandler.get_events()['PMEvent'].register(self.handler) self.connection.tasks.update({ "GoogleSearch__scheduled_cache_clean" : self.scheduler.add_interval_job( self.clean_cache, days = 1 ) } ) self.url = "https://ajax.googleapis.com/ajax/services/search/web?" self.prefix = "%sG%so%so%sg%sl%se%s" % (Escapes.BLUE, Escapes.RED, Escapes.YELLOW, Escapes.BLUE, Escapes.GREEN, Escapes.RED, Escapes.BLACK)
def __init__(self, connection, eventhandler): Plugin.__init__(self, connection, eventhandler, needs_dir = True) HTTPServer.running = False self.config = self.get_plugin_configuration() if len(self.config) == 0: raise Exception("You must configure options for the HTTP server in your server config!") self.resource_path = self.config['resource_path'] if self.resource_path[0] == '/': self.resource_path = self.resource_path[1:] self.resource_path = self.get_path() + self.resource_path self.resource_route = self.config['resource_route'] if self.resource_route[0] == '/': self.resource_route = self.resource_route[1:] if not os.path.exists(self.resource_path): try: os.makedirs(self.resource_path) except (OSError) as e: if e.errno != errno.EEXIST: raise sys.stderr = WSGILoggingHandler() sys.stdout = sys.stderr self.request_handlers = {} self.__thread = None self.__load_layers() self.eventhandler.get_events()['MessageEvent'].register(self.handler) self.eventhandler.get_events()['PluginsLoadedEvent'].register(self.__on_plugins_loaded)
def __init__(self, connection, eventhandler): Plugin.__init__(self, connection, eventhandler, needs_dir = True) self.brain = megahal.MegaHAL(brainfile = self.get_path() + "/brain") self.scheduler = connection.scheduler self.eventhandler.get_events()['MessageEvent'].register(self.handler) self.eventhandler.get_events()['PluginsLoadedEvent'].register(self._load_identification) self.ignored = [] # chance (out of 100) that the AI will respond (per-channel). self.response_chances = {} self.default_chance = 30 self.connection.tasks.update({ "ArtificialIntelligence__scheduled_sync" : self.scheduler.add_interval_job( self.sync, minutes = 30 ) } )
def __init__( self ): Plugin.__init__( self, "France Inter", "http://sites.radiofrance.fr/franceinter/accueil/", 30 ) if os.path.exists( self.fichierCache ): self.listeEmissions = self.chargerCache()
def __init__(self, connection, eventhandler): Plugin.__init__(self, connection, eventhandler, needs_dir = False) self.eventhandler.get_events()['MessageEvent'].register(self.handler)
def __init__(self, factory): Plugin.__init__(self, factory) self.channel_message_rule = "%s: say ([^ ]*) (.*)" % factory.nickname self.user_join_rule = ".*?"
def __init__(self, factory): Plugin.__init__(self, factory) self.channel_message_rule = "%s: quote" % self.factory.nickname
def __init__(self, factory): Plugin.__init__(self, factory) self.channel_message_rule = "%s: help" % factory.nickname
def __init__( self): Plugin.__init__( self, "Podcasts", "", 30 )
def __init__(self, factory): Plugin.__init__(self, factory) self.channel_message_rule = ".*?"
def __init__(self): Plugin.__init__(self, "Radio France", "http://www.radiofrance.fr/", 30)
def __init__(self, factory): Plugin.__init__(self, factory) self.connected_rule = ".*?"
def __init__(self, connection, eventhandler): Plugin.__init__(self, connection, eventhandler, needs_dir=False) self.eventhandler.get_events()['MessageEvent'].register(self.handler)
def __init__( self): Plugin.__init__( self, "Radio France", "http://www.radiofrance.fr/", 30 )
def __init__(self): Plugin.__init__(self, self.nom, self.url, 7) #7 = fréquence de rafraichissement if os.path.exists(self.fichierCache): self.listeChaines = self.chargerCache()