Exemplo n.º 1
0
    def __init__(
        self, ircbot, cache_time=datetime.timedelta(hours=1),
        random_message=[None, None]
    ):
        Plugin.__init__(self, ircbot, cache_time, random_message)

        self.__nickname = None
Exemplo n.º 2
0
    def __init__(self,
                 ircbot,
                 cache_time=datetime.timedelta(hours=1),
                 random_message=[None, None]):
        Plugin.__init__(self, ircbot, cache_time, random_message)

        self.__nickname = None
Exemplo n.º 3
0
 def __init__(
         self,
         ircbot,
         cache_time=None,
         random_message=[6 * 60 * 60, 24 * 60 * 60]  # between 6 h and 24 h
 ):
     Plugin.__init__(self, ircbot, cache_time, random_message)
Exemplo n.º 4
0
 def __init__(
         self,
         ircbot,
         cache_time=None,
         random_message=[4 * 60 * 60, 8 * 60 * 60]  # between 4 h and 8 h
 ):
     Plugin.__init__(self, ircbot, cache_time, random_message)
Exemplo n.º 5
0
    def __init__(
        self, ircbot, cache_time=datetime.timedelta(days=365*10),
        random_message=[None, None]
    ):
        Plugin.__init__(self, ircbot, cache_time, random_message)

        #load all urls from cache
        reload_data, self.urls = self.load_cache()
        if self.urls is None:
            self.urls = []
Exemplo n.º 6
0
    def __init__(
        self, ircbot, cache_time=datetime.timedelta(days=0),
        random_message=[None, None]
    ):
        Plugin.__init__(self, ircbot, cache_time, random_message)

        #set locale to German (required for parsing the German date)
        try:
            locale.setlocale(locale.LC_ALL, "de_DE.UTF-8")
        except Exception, e:
            print "de_DE.UTF-8 needs to be generated so that the " \
                  "date can be parsed correctly! (use 'dpkg-" \
                  "reconfigure locales' to generate the " \
                  "corresponding locales)"
            sys.exit(1)
Exemplo n.º 7
0
    def __init__(self,
                 ircbot,
                 cache_time=datetime.timedelta(days=1),
                 random_message=[None, None]):
        Plugin.__init__(self, ircbot, cache_time, random_message)

        #set locale to German (required for parsing the German date)
        try:
            locale.setlocale(locale.LC_ALL, "de_DE.UTF-8")
        except Exception, e:
            print "de_DE.UTF-8 needs to be generated so that the " \
                  "date can be parsed correctly! (use 'dpkg-" \
                  "reconfigure locales' to generate the " \
                  "corresponding locales)"
            sys.exit(1)
Exemplo n.º 8
0
    def __init__(self,
                 ircbot,
                 cache_time=datetime.timedelta(days=1),
                 random_message=[None, None]):
        Plugin.__init__(self, ircbot, cache_time, random_message)

        #get data from cache
        reload_data, self.count = self.load_cache()
        if not self.count:
            #not cached yet, reset counts
            self.count = {}

        #dict with positive and negative words that are matched
        self.words = {}

        #load wordlists
        self._load_words()
Exemplo n.º 9
0
    def __init__(
        self, ircbot, cache_time=datetime.timedelta(days=1),
        random_message=[None, None]
    ):
        Plugin.__init__(self, ircbot, cache_time, random_message)

        #get data from cache
        reload_data, self.count = self.load_cache()
        if not self.count:
            #not cached yet, reset counts
            self.count = {}

        #dict with positive and negative words that are matched
        self.words = {}

        #load wordlists
        self._load_words()
Exemplo n.º 10
0
 def __init__(
     self, ircbot, cache_time=None,
     random_message=[6 * 60 * 60, 24 * 60 * 60] # between 6 h and 24 h
 ):
     Plugin.__init__(self, ircbot, cache_time, random_message)
Exemplo n.º 11
0
 def __init__(self,
              ircbot,
              cache_time=datetime.timedelta(minutes=1),
              random_message=[None, None]):
     Plugin.__init__(self, ircbot, cache_time, random_message)
Exemplo n.º 12
0
 def __init__(
     self, ircbot, cache_time=None,
     random_message=[4 * 60 * 60, 8 * 60 * 60] # between 4 h and 8 h
 ):
     Plugin.__init__(self, ircbot, cache_time, random_message)
Exemplo n.º 13
0
 def __init__(self, ircbot, cache_time=None, random_message=[None, None]):
     Plugin.__init__(self, ircbot, cache_time, random_message)
Exemplo n.º 14
0
 def __init__(
     self, ircbot, cache_time=None,
     random_message=[None, None]
 ):
     Plugin.__init__(self, ircbot, cache_time, random_message)
Exemplo n.º 15
0
 def __init__(
     self, ircbot, cache_time=datetime.timedelta(minutes=1),
     random_message=[None, None]
 ):
     Plugin.__init__(self, ircbot, cache_time, random_message)
Exemplo n.º 16
0
 def __init__(self, paginated, *args, **opts):
     self.paginated = paginated
     Plugin.__init__(self, *args, **opts)