summaryrefslogtreecommitdiff
path: root/omegle.py
diff options
context:
space:
mode:
Diffstat (limited to 'omegle.py')
-rw-r--r--omegle.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/omegle.py b/omegle.py
index 9a75a26..2df4ee3 100644
--- a/omegle.py
+++ b/omegle.py
@@ -189,7 +189,8 @@ if __name__ == "__main__":
logging.basicConfig(level=logging.INFO)
print "Lets chat. Type \"quit\" to disconnect"
chat = OmegleChat()
- def exit(self):
+ def exit():
+ OmegleChat.on_disconnect(chat)
sys.exit(0)
chat.on_disconnect = exit
chat.start()