Example #1
0
 def __init__(self, feeds=()):
     BotPlugin.__init__(self)
     self._feeds = feeds
     for feed in feeds:
         url = feed['url']
         logging.info("rssbot.py script starting with feed %s.", url)
         self.threads[url] = thread.start_new(self.loop, **feed)
Example #2
0
 def __init__(self, feeds=()):
     BotPlugin.__init__(self)
     self._feeds = feeds
     for feed in feeds:
         url = feed['url']
         logging.info("rssbot.py script starting with feed %s.", url)
         self.threads[url] = thread.start_new(self.loop, **feed)
Example #3
0
 def __init__(self,
              verbs=Slap.DEFAULT_VERBS,
              size=Slap.DEFAULT_SIZE,
              tools=Slap.DEFAULT_TOOLS):
     BotPlugin.__init__(self)
     self.slap_verbs = [v.strip() for v in verbs.split(',')]
     self.slap_tools = [t.strip() for t in tools.split(',')]
     self.slap_size = [s.strip() for s in size.split(',')]
Example #4
0
 def __init__(self, aliases=None):
     BotPlugin.__init__(self)
     # global aliases
     self.global_aliases = {}
     if not aliases:
         return
     for alias, cmd in aliases.items():
         logging.debug("Load global alias: %s", alias)
         self.global_aliases[alias] = AliasCmd(None, alias, cmd)
Example #5
0
 def __init__(self):
     try:
         from guppy import hpy
         self.hpy = hpy()
     except:
         delattr(Info, 'mem')
         logging.warning("guppy not present. mem plugin not available")
     BotPlugin.__init__(self)
     self.started = False
Example #6
0
 def __init__(self):
     try:
         from guppy import hpy
         self.hpy = hpy()
     except:
         delattr(Info, 'mem')
         logging.warning("guppy not present. mem plugin not available")
     BotPlugin.__init__(self)
     self.started = False
Example #7
0
 def __init__(self, aliases=None):
     BotPlugin.__init__(self)
     # global aliases
     self.global_aliases = {}
     if not aliases:
         return
     for alias, cmd in aliases.items():
         logging.debug("Load global alias: %s", alias)
         self.global_aliases[alias] = AliasCmd(None, alias, cmd)
Example #8
0
 def __init__(self,
              passgen={
                  'choice': 'all',
                  'length': 8,
                  'max_length': 100
              }):
     # Passgen defaults
     BotPlugin.__init__(self)
     self._passgen = confighandler.get_defaults(
         self.__init__).update(passgen)
Example #9
0
 def __init__(self, bot, config):
     BotPlugin.__init__(self, bot, config)
     self.know = []
     self.loaddefault()
     self.idlemin = int(self.config.get('idlemin', 60))
     self.idlemax = int(self.config.get('idlemax', 600))
     self.bot.add_event_handler("groupchat_message", self.handle_message_event, threaded=True)
     self.search = re.compile("""(([Tt]he|[mM]y)[\s\w\-0-9]+ (is|are|can|has|got)|I am|i am|I'm|(?=^|,|\.\s|\?)?[\w'0-9\-]+ (is|are|can|got|has))[\s\w'0-9\-:$@%^&*"]+""")
     self.prep = ["Let's see... %s.", '%s.', 'I know that %s.', 'I heard that %s.', 'Rumor has it that %s.', 'Did you hear that %s?', 'A little bird told me that %s.', '%s?!??!']
     self.running = True
     self.lastroom = None
     self.lastmessage = ''
     thread.start_new(self.idle, tuple())
Example #10
0
 def __init__(self, bot, config):
     BotPlugin.__init__(self, bot, config)
     self.know = []
     self.loaddefault()
     self.idlemin = int(self.config.get('idlemin', 60))
     self.idlemax = int(self.config.get('idlemax', 600))
     self.bot.add_event_handler("groupchat_message",
                                self.handle_message_event,
                                threaded=True)
     self.search = re.compile(
         """(([Tt]he|[mM]y)[\s\w\-0-9]+ (is|are|can|has|got)|I am|i am|I'm|(?=^|,|\.\s|\?)?[\w'0-9\-]+ (is|are|can|got|has))[\s\w'0-9\-:$@%^&*"]+"""
     )
     self.prep = [
         "Let's see... %s.", '%s.', 'I know that %s.', 'I heard that %s.',
         'Rumor has it that %s.', 'Did you hear that %s?',
         'A little bird told me that %s.', '%s?!??!'
     ]
     self.running = True
     self.lastroom = None
     self.lastmessage = ''
     thread.start_new(self.idle, tuple())
Example #11
0
 def __init__(self, logs=()):
     BotPlugin.__init__(self)
     self._logs = logs
Example #12
0
 def __init__(self, verbs=Slap.DEFAULT_VERBS, size=Slap.DEFAULT_SIZE,
              tools=Slap.DEFAULT_TOOLS):
     BotPlugin.__init__(self)
     self.slap_verbs = [v.strip() for v in verbs.split(',')]
     self.slap_tools = [t.strip() for t in tools.split(',')]
     self.slap_size = [s.strip() for s in size.split(',')]      
Example #13
0
 def __init__(self):
     BotPlugin.__init__(self)
     self.__event = threading.Event()
Example #14
0
 def __init__(self, idlemin=60, idlemax=600):
     BotPlugin.__init__(self)
     confighandler.dict_to_private(self, kwargs)
Example #15
0
 def __init__(self, passgen={'choice': 'all', 'length': 8, 'max_length': 100}):
     # Passgen defaults
     BotPlugin.__init__(self)
     self._passgen = confighandler.get_defaults(self.__init__).update(passgen)
Example #16
0
 def __init__(self, logs=()):
     BotPlugin.__init__(self)
     self._logs = logs
Example #17
0
 def __init__(self, idlemin=60, idlemax=600):
     BotPlugin.__init__(self)
     confighandler.dict_to_private(self, kwargs)
Example #18
0
 def __init__(self):
     BotPlugin.__init__(self)
     self.__event = threading.Event()