summaryrefslogtreecommitdiff
path: root/proxy.py
diff options
context:
space:
mode:
Diffstat (limited to 'proxy.py')
-rw-r--r--proxy.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/proxy.py b/proxy.py
index 5c37bb7..02569ee 100644
--- a/proxy.py
+++ b/proxy.py
@@ -1,5 +1,5 @@
from omegle import OmegleChat
-import sys
+import sys, logging
class OmegleProxyChat(OmegleChat):
@@ -11,17 +11,22 @@ class OmegleProxyChat(OmegleChat):
self.partner = partner
def on_message(self,message):
- print "%s: %s" %(self.name, message)
+ print "[MSG] %s: %s" %(self.name, message)
self.partner.send(message)
def on_connect(self):
- print "%s Connected" % self.name
+ print "[EVT] %s Connection confirmed" % self.name
def on_typing(self):
- print "%s is typing" % self.name
+ print "[EVT] %s is typing" % self.name
self.partner.typing()
+ def on_stopped_typing(self):
+ print "[EVT] %s stopped typing" % self.name
+ self.partner.stopped_typing()
def on_disconnect(self):
- print "%s disconnect" % self.name
+ print "[EVT] %s disconnect" % self.name
self.partner.disconnect()
+logging.basicConfig(level=logging.DEBUG)
+
A=OmegleProxyChat("A")
B=OmegleProxyChat("B")