Browse Source

make it easier for the bot to exit, allow rejoin after part within 7 seconds

master
jcao219 14 years ago
parent
commit
e6639118db
  1. 3
      oyoyo/client.py
  2. 2
      var.py
  3. 2
      wolfbot.py

3
oyoyo/client.py

@ -190,7 +190,7 @@ class IRCClient(object): @@ -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): @@ -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

@ -14,7 +14,7 @@ DAY_TIME_LIMIT_CHANGE = 120 # After DAY_TIME_LIMIT_WARN has passed @@ -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 = ""

2
wolfbot.py

@ -119,5 +119,5 @@ def main(): @@ -119,5 +119,5 @@ def main():
if __name__ == "__main__":
try:
main()
except:
except Exception:
logging.error(traceback.format_exc())

Loading…
Cancel
Save