Commit 10eb3585 authored by Svetlana Tkachenko's avatar Svetlana Tkachenko
Browse files

Die properly - close the process instead of nomming CPU. (related to issue #7;...

Die properly - close the process instead of nomming CPU. (related to issue #7; thanks Nem0 for suggesting the solution.)
parent 93b8c6e9
......@@ -22,6 +22,7 @@
import socket, re, asynchat, traceback, ssl
import plugins
import time
import os
class User(str):
......@@ -388,7 +389,12 @@ class IRC(asynchat.async_chat):
def doQuit(self, message=""):
self.sendLine("QUIT :" + message)
self.pluginManager.event("quit", User(self.config["nickname"]), message)
self.close_when_done()
# self.prnt("Closing when done...")
# self.close_when_done()
# self.prnt("sys.exiting...")
# sys.exit("By user request.")
os._exit(2)
self.prnt("Exited.")
def doNotice(self, user, message):
self.sendLine("NOTICE " + user + " :" + message)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment