Пример #1
0
 def __init__(self, host, port, channel, nickname, password):
     SimpleIRCClient.__init__(self)
     self.host = host
     self.port = int(port) if str(port).isdigit() else 6667
     self.channel = channel
     self.nickname = nickname
     password = password or None
     self.connect(self.host, self.port, self.nickname, password=password)
Пример #2
0
 def __init__(self, host, port, channel, nickname, password):
     SimpleIRCClient.__init__(self)
     self.host = host
     self.port = int(port) if str(port).isdigit() else 6667
     self.channel = channel
     self.nickname = nickname
     password = password or None
     self.connect(self.host, self.port, self.nickname, password=password)
Пример #3
0
 def __init__(self, config):
     SimpleIRCClient.__init__(self)
     self.config = config
     self.start_time = time.time()
     self.reconnection_interval = 10
     self.recon = ReconnectStrategy(min_interval=self.reconnection_interval)
     self.channels = dict()
     self.msg_queue = Queue()
     self.msg_queue_thread = threading.Thread(target=self.msq_queue_tasks, args=(self.connection, self.msg_queue, config.network.announce_delay,))
     self.msg_queue_thread.setDaemon(1)
     self.msg_queue_thread.start()
     self.history_manager()
     self.init_mircColors()
Пример #4
0
 def __init__(self, chan, root, addr):
     self._log = logging.getLogger('ServBot-%s' % chan)
     IRC.__init__(self)
     self._chan = str(chan)
     if not os.path.exists(root):
         os.mkdir(root)
     self._root = root
     self._sendq = []
     self._active_dcc = {}
     self._dcc = None
     self._file = None
     self._dcc_timeout = 0
     self._filesize = -1
     self.prefix = '\\'
     self._dcc_addr = addr
Пример #5
0
 def __init__(self, chan, root, addr):
     self._log = logging.getLogger('ServBot-%s' % chan)
     IRC.__init__(self)
     self._chan = str(chan)
     if not os.path.exists(root):
         os.mkdir(root)
     self._root = root
     self._sendq = []
     self._active_dcc = {}
     self._dcc = None
     self._file = None
     self._dcc_timeout = 0
     self._filesize = -1
     self.prefix = '\\'
     self.reactor.execute_every(1, self._pump)
     self._dcc_addr = addr
Пример #6
0
 def __init__(self, nick, config):
     self.nick = nick
     self.config = config
     self.loading = False
     SimpleIRCClient.__init__(self)
Пример #7
0
 def __init__(self, nick, config):
     self.nick = nick
     self.config = config
     self.loading = False
     SimpleIRCClient.__init__(self)
Пример #8
0
 def __init__(self, channel, new_topic_function):
     SimpleIRCClient.__init__(self)
     self._channel = channel
     self._new_topic = new_topic_function
     self._current_topic = None
     self._is_operator = False