ircserver.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:pep.py 作者: osuripple 项目源码 文件源码
def disconnect(self, quitmsg = "Client quit", callLogout = True):
        """
        Disconnects this client from the IRC server

        :param quitmsg: IRC quit message. Default: 'Client quit'
        :param callLogout: if True, call logoutEvent on bancho
        :return:
        """
        # Send error to client and close socket
        self.message("ERROR :{}".format(quitmsg))
        self.socket.close()
        log.info("[IRC] Disconnected connection from {}:{} ({})".format(self.ip, self.port, quitmsg))

        # Remove socket from server
        self.server.removeClient(self, quitmsg)

        # Bancho logout
        if callLogout and self.banchoUsername != "":
            chat.IRCDisconnect(self.IRCUsername)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号