summaryrefslogtreecommitdiff
path: root/omegle.py
diff options
context:
space:
mode:
authoryvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd>2009-06-10 05:31:26 +0000
committeryvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd>2009-06-10 05:31:26 +0000
commit7279c2ba6e9ad29a8e635c21d5549b21d7b8c461 (patch)
tree7664877372ac8cb3e145d8cc9eb429bbf5420aeb /omegle.py
parent39c6f9c39789e3941575e55e30c401d3c51657b4 (diff)
downloadomegle-7279c2ba6e9ad29a8e635c21d5549b21d7b8c461.tar.gz
omegle-7279c2ba6e9ad29a8e635c21d5549b21d7b8c461.zip
idlecount
git-svn-id: http://xapek.org/svn/common/omegle@1097 d0e8fea9-7529-0410-93fb-d39fd5b9c1dd
Diffstat (limited to 'omegle.py')
-rw-r--r--omegle.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/omegle.py b/omegle.py
index 4f5e327..422c587 100644
--- a/omegle.py
+++ b/omegle.py
@@ -155,7 +155,7 @@ class OmegleChat(RESTClient):
try:
data_set=json.read(body.decode("utf8"))
if not data_set:
- self.logger.debug("event: no data received")
+ self.on_idle()
return
for data in data_set:
if data[0] == "typing":
@@ -179,6 +179,8 @@ class OmegleChat(RESTClient):
except json.ReadException:
self.logger.error("Json ReadException. Body: %s" % body)
+ def on_idle(self):
+ self.logger.debug("event: no data received")
def on_message(self,message):
"""To be overwritten"""
self.logger.info("<<< %s" % message)