make it easier for the bot to exit, allow rejoin after part within 7 seconds
This commit is contained in:
parent
45d8ed53ac
commit
abf194b92b
@ -190,7 +190,7 @@ class IRCClient(object):
|
||||
try:
|
||||
buffer += self.socket.recv(1024)
|
||||
except socket.error as e:
|
||||
if not self.blocking and e.errno == 11:
|
||||
if False and not self.blocking and e.errno == 11:
|
||||
pass
|
||||
else:
|
||||
raise e
|
||||
@ -228,6 +228,7 @@ class IRCClient(object):
|
||||
if self.socket:
|
||||
logging.info('closing socket')
|
||||
self.socket.close()
|
||||
raise SystemExit
|
||||
def msg(self, user, msg):
|
||||
for line in msg.split('\n'):
|
||||
maxchars = 494 - len(self.nickname+self.ident+self.hostmask+user)
|
||||
|
2
var.py
2
var.py
@ -14,7 +14,7 @@ DAY_TIME_LIMIT_CHANGE = 120 # After DAY_TIME_LIMIT_WARN has passed
|
||||
START_WITH_DAY = False
|
||||
KILL_IDLE_TIME = 300
|
||||
WARN_IDLE_TIME = 180
|
||||
PART_GRACE_TIME = 0
|
||||
PART_GRACE_TIME = 7
|
||||
QUIT_GRACE_TIME = 30
|
||||
|
||||
LOG_FILENAME = ""
|
||||
|
@ -119,5 +119,5 @@ def main():
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
main()
|
||||
except:
|
||||
except Exception:
|
||||
logging.error(traceback.format_exc())
|
||||
|
Loading…
x
Reference in New Issue
Block a user