summaryrefslogtreecommitdiff
path: root/chat.py
diff options
context:
space:
mode:
authoryvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd>2009-06-09 18:30:34 +0000
committeryvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd>2009-06-09 18:30:34 +0000
commitb20f49dfea22835e03404c68bc78cc6344b40300 (patch)
treeb857997556edb04449ed32d3f713024f823267a3 /chat.py
parent791c5a3c70985c309136c3fb33c992779e7cf935 (diff)
downloadomegle-b20f49dfea22835e03404c68bc78cc6344b40300.tar.gz
omegle-b20f49dfea22835e03404c68bc78cc6344b40300.zip
blah
git-svn-id: http://xapek.org/svn/common/omegle@1092 d0e8fea9-7529-0410-93fb-d39fd5b9c1dd
Diffstat (limited to 'chat.py')
-rw-r--r--chat.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/chat.py b/chat.py
index be36aec..5a78346 100644
--- a/chat.py
+++ b/chat.py
@@ -78,8 +78,8 @@ class ConversationWindow(object):
pass
class Omegle(OmegleChat):
- def __init__(self,chatwindow):
- OmegleChat.__init__(self)
+ def __init__(self,chatwindow,host="www.omegle.com"):
+ OmegleChat.__init__(self,host=host)
self.chatwindow = chatwindow
def on_message(self,message):
@@ -96,9 +96,10 @@ class Omegle(OmegleChat):
self.chatwindow.add_message("Server send Wait")
class Chat(ConversationWindow):
- def __init__(self):
+ def __init__(self,host="www.omegle.com"):
+ print "Chat(host=%s)" % (host)
ConversationWindow.__init__(self)
- self.omegle = Omegle(self)
+ self.omegle = Omegle(self,host=host)
def on_toggle_connect(self):
if self.omegle.is_connected:
@@ -121,9 +122,10 @@ class Chat(ConversationWindow):
else:
self.add_message("Not connected/confirmed")
-import logging
-logging.basicConfig(filename="chat.py.log",level=logging.DEBUG)
-Chat().main()
+if __name__ == "__main__":
+ import logging
+ logging.basicConfig(filename="chat.py.log",level=logging.DEBUG)
+ Chat().main()
"""
Unterstuetzt im moment noch nicht das senden des /typing