From 594699e711200eba92bc9fe7a0bedd39270b2768 Mon Sep 17 00:00:00 2001 From: yvesf Date: Wed, 27 May 2009 21:45:23 +0000 Subject: blah git-svn-id: http://xapek.org/svn/common/omegle@1018 d0e8fea9-7529-0410-93fb-d39fd5b9c1dd --- proxy.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'proxy.py') 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") -- cgit v1.2.1