Пример #1
0
 def __init__(self, config=default_config):
     self.config = config
     log.info("using config file %s" % (config))
     asybot.__init__(self,
                     getconf('irc_server'),
                     getconf('irc_port'),
                     getconf('irc_nickname'),
                     getconf('irc_channels'),
                     hammer_interval=getconf('irc_hammer_interval'),
                     alarm_timeout=getconf('irc_alarm_timeout'),
                     kill_timeout=getconf('irc_kill_timeout'))
Пример #2
0
 def __init__(self, rss, name, chans=['#news'], url_shortener="http://localhost", server='ire', port=6667, timeout=60):
     try:
         asybot.__init__(self, server, port, name, chans)
     except Exception as e:
         print(e)
     self.url = rss
     self.to = timeout
     self.oldnews = []
     self.loop = True
     self.lastnew = datetime.now()
     self.url_shortener = url_shortener
     self.retry = True
Пример #3
0
 def __init__(self,
              name,
              channels=['#test'],
              server='ire',
              port=6667,
              timeout=60,
              loglevel=logging.ERROR,
              url_shortener='http://localhost'):
     asybot.__init__(self, server, port, name, channels, loglevel=loglevel)
     self.to = timeout
     self.url_shortener = url_shortener
     self.ctrl_chan = channels[0]
Пример #4
0
 def __init__(self, config=default_config):
     self.config = config
     log.info("using config file %s" % (config))
     asybot.__init__(
         self,
         getconf("irc_server"),
         getconf("irc_port"),
         getconf("irc_nickname"),
         getconf("irc_channels"),
         hammer_interval=getconf("irc_hammer_interval"),
         alarm_timeout=getconf("irc_alarm_timeout"),
         kill_timeout=getconf("irc_kill_timeout"),
     )
Пример #5
0
 def __init__(self,
              rss,
              name,
              chans=['#news'],
              url_shortener="http://localhost",
              server='ire',
              port=6667,
              timeout=60):
     try:
         asybot.__init__(self, server, port, name, chans)
     except Exception as e:
         print(e)
     self.url = rss
     self.to = timeout
     self.oldnews = []
     self.loop = True
     self.lastnew = datetime.now()
     self.url_shortener = url_shortener
     self.retry = True
Пример #6
0
 def __init__(self, name, channels=['#test'], server='ire', port=6667, timeout=60, loglevel=logging.ERROR, url_shortener='http://localhost'):
     asybot.__init__(self, server, port, name, channels, loglevel=loglevel)
     self.to = timeout
     self.url_shortener = url_shortener
     self.ctrl_chan = channels[0]