def __init__(self, port, onCommand): MySocketServer.__init__(self, HOST, port, 'QQBot-Term 服务器') self.response = onCommand
def Run(self): if not self.port: INFO('QQBot-Term 服务器未开启,qq 命令和 HTTP-API 接口将无法使用') else: MySocketServer.Run(self)
def __init__(self, ip, port, qrcodePath, qrcodeId): MySocketServer.__init__(self, '0.0.0.0', port, '二维码 HTTP 服务器') self.qrcodePath = qrcodePath self.qrcodeURL = 'http://%s:%s/%s' % (ip, port, qrcodeId)
def __init__(self, ip, port, bot): MySocketServer.__init__(self, ip, port, 'QQBot-IRC-SERVER') self.createtime = time.asctime(time.localtime()) self.bot = bot