Beispiel #1
0
 def __init__(self, cfg):
     BotBase.__init__(self, cfg)
     self.type = 'irc'
     self.wait = Wait()
     self.outputlock = thread.allocate_lock()
     self.fsock = None
     self.oldsock = None
     self.sock = None
     self.nolimiter = self.cfg['nolimiter']
     self.reconnectcount = 0
     self.pongcheck = 0
     self.nickchanged = 0
     self.noauto433 = 0
     if not self.state.has_key('alternick'):
         self.state['alternick'] = self.cfg['alternick']
     if not self.state.has_key('no-op'):
         self.state['no-op'] = []
     self.nick = self.cfg['nick']
     self.nrevents = 0
     self.gcevents = 0
     self.outqueues = [Queue.Queue() for i in range(10)]
     self.tickqueue = Queue.Queue()
     self.nicks401 = []
     self.stopreadloop = False
     self.stopoutloop = False
     if self.port == 0:
         self.port = 6667
     self.connectlock = thread.allocate_lock()
     self.encoding = 'utf-8'
Beispiel #2
0
 def __init__(self, cfg):
     BotBase.__init__(self, cfg)
     self.type = 'irc'
     self.wait = Wait()
     self.outputlock = thread.allocate_lock()
     self.fsock = None
     self.oldsock = None
     self.sock = None
     self.nolimiter = self.cfg['nolimiter']
     self.reconnectcount = 0
     self.pongcheck = 0
     self.nickchanged = 0
     self.noauto433 = 0
     if not self.state.has_key('alternick'):
         self.state['alternick'] = self.cfg['alternick']
     if not self.state.has_key('no-op'):
         self.state['no-op'] = []
     self.nick = self.cfg['nick']
     self.nrevents = 0
     self.gcevents = 0
     self.outqueues = [Queue.Queue() for i in range(10)]
     self.tickqueue = Queue.Queue()
     self.nicks401 = []
     self.stopreadloop = False
     self.stopoutloop = False
     if self.port == 0:
         self.port = 6667
     self.connectlock = thread.allocate_lock()
     self.encoding = 'utf-8'
 def __init__(self, cfg):
     BotBase.__init__(self, cfg)
     if not self.port:
         self.port = 5222
     self.type = 'jabber'
     self.outqueue = Queue.Queue()
     self.sock = None
     self.me = None
     self.lastin = None
     self.test = 0
     self.connecttime = 0
     self.connection = None
     self.privwait = Jabberwait()
     self.errorwait = Jabbererrorwait()
     self.jabber = True
     self.connectok = threading.Event()
     self.jids = {}
     self.topics = {}
     self.timejoined = {}
     self.channels409 = []
     if not self.state.has_key('ratelimit'):
         self.state['ratelimit'] = 0.05
     if self.port == 0:
         self.port = 5222
Beispiel #4
0
 def __init__(self, cfg):
     BotBase.__init__(self, cfg)
     if not self.port:
         self.port = 5222
     self.type = 'jabber'
     self.outqueue = Queue.Queue()
     self.sock = None
     self.me = None
     self.lastin = None
     self.test = 0
     self.connecttime = 0
     self.connection = None
     self.privwait = Jabberwait()
     self.errorwait = Jabbererrorwait()
     self.jabber = True
     self.connectok = threading.Event()
     self.jids = {}
     self.topics = {}
     self.timejoined = {}
     self.channels409 = []
     if not self.state.has_key('ratelimit'):
         self.state['ratelimit'] = 0.05
     if self.port == 0:
         self.port = 5222