summaryrefslogtreecommitdiff
path: root/omegle.py
diff options
context:
space:
mode:
Diffstat (limited to 'omegle.py')
-rw-r--r--omegle.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/omegle.py b/omegle.py
index 422c587..41f012e 100644
--- a/omegle.py
+++ b/omegle.py
@@ -129,6 +129,10 @@ class OmegleChat(RESTClient):
#convert utf8 to RAW-utf8
msg = msg.encode("utf8")
+ if not self.is_confirmed:
+ self.logger.error("Cant send message if not is_confirmed")
+ return ###XXX raise??
+
r = RESTClient.request(self,"POST","/send",urllib.urlencode({'id':self.id,'msg':msg}))
body = r.read()
if body != "win":