From d861d7bf0cfc87d25e72a31f0a39dfd072a08115 Mon Sep 17 00:00:00 2001 From: ed Date: Sat, 10 Feb 2018 18:11:36 +0100 Subject: [PATCH] less bot noise --- r0c/ivt100.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/r0c/ivt100.py b/r0c/ivt100.py index 2d8a76f..d4d1ba3 100644 --- a/r0c/ivt100.py +++ b/r0c/ivt100.py @@ -77,7 +77,7 @@ class VT100_Server(asyncore.dispatcher): print('client join: {0} {1} {2}'.format( remote.user.nick, *list(remote.addr))) - def part(self, remote): + def part(self, remote, announce=True): remote.dead = True with self.world.mutex: #print('==[part]' + '='*72) @@ -85,8 +85,9 @@ class VT100_Server(asyncore.dispatcher): #print('==[part]' + '='*71) remote.close() - print('client part: {0} {1} {2}'.format( - remote.user.nick, *list(remote.addr))) + if announce: + print('client part: {0} {1} {2}'.format( + remote.user.nick, *list(remote.addr))) self.clients.remove(remote) try: remote.user.active_chan = None @@ -1501,11 +1502,11 @@ class VT100_Client(asyncore.dispatcher): self.is_bot = True time.sleep(69) try: - self.host.part(self) - except: - print('botkick err: {0} {1}'.format( + self.host.part(self, False) + print(' botkick: {0} {1}'.format( self.user.nick, self.addr[0])) - + except: + pass def conf_wizard(self):