diff options
-rw-r--r-- | omegle.py | 6 | ||||
-rw-r--r-- | proxy.py | 2 |
2 files changed, 3 insertions, 5 deletions
@@ -91,16 +91,14 @@ class OmegleChat(RESTClient): self.is_connected = False self.timer.stop() if self.is_confirmed: - self.is_confirmed = False - self.id = None r = RESTClient.request(self,"POST", "/disconnect", urllib.urlencode({'id': self.id})) body = r.read() self.logger.debug("/disconnect sent. Read: %s" % body) if body == "win": - pass + self.is_confirmed = False + self.id = None else: self.is_connected = True #disconnect failed - self.is_confirmed = True raise Exception("/disconnect; Bad response: %s" % body) def _events(self): @@ -56,7 +56,7 @@ if __name__ == "__main__": "blue":34,"magenta":35, "cyan":36, "white":37, "black":38, "black":39} logging.basicConfig(level=logging.DEBUG) - logging.getLogger().info("press ctrl-c to abort") + print "press ctrl-c to abort" event = Event() A=OmegleProxyChat(event,"A",colors['red']) |