From 9fc737865ab67fa1302cc1f49f3f563ef057782b Mon Sep 17 00:00:00 2001 From: yvesf Date: Thu, 14 Jan 2010 23:03:06 +0000 Subject: save git-svn-id: http://xapek.org/svn/common/omegle@1538 d0e8fea9-7529-0410-93fb-d39fd5b9c1dd --- omegle/icqBuddy.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'omegle/icqBuddy.py') diff --git a/omegle/icqBuddy.py b/omegle/icqBuddy.py index c51419f..1a9d609 100644 --- a/omegle/icqBuddy.py +++ b/omegle/icqBuddy.py @@ -9,10 +9,9 @@ from twisted.internet import reactor from twisted.python import log from omegle import OmegleChat -from icq import ExtendedBOSConnection, ReconnectOscarFactory +from icq import ExtendedBOSConnection, ReconnectingOSCARLoginFactory -ICQ_UIN = '446323989' -ICQ_PASSWORD = 'gagaga' +ICQ_UIN, ICQ_PASSWORD = ('446323989', 'gagaga') def random_greetings(): gr = ( @@ -20,7 +19,9 @@ def random_greetings(): "Connected with Omegle, be retarted with strangers!", "Omegle ... its like pedo-roulette", "Under law 153:276:935 section 864, Omegle is required to inform you that the person you are currently chatting with owns the IP address of a registered sex offender. Please be careful when chatting with this person, and remember never to give out your personal information. The person you are chatting with cannot see this message.", + "You're Now On Omegle, Note: In China Too Young Is Just a Name", ) + return "==== %s" % gr[random.randint(0,len(gr)-1)] class OmegleICQChat(OmegleChat): @@ -67,7 +68,8 @@ class ICQBuddy( ExtendedBOSConnection ): self.omegleConns = {} def shutdown( self ): - for conn in self.omegleConns: + for k in self.omegleConns.keys(): + conn = self.omegleConns[k] if conn.is_connected: conn.disconnect() @@ -116,6 +118,8 @@ if __name__ == '__main__': logging.basicConfig(level=logging.INFO) log.startLogging(sys.stdout) - factory = ReconnectOscarFactory(ICQBuddy, ICQ_UIN,ICQ_PASSWORD,icq=1) + f = ReconnectingOSCARLoginFactory(ICQ_UIN, ICQ_PASSWORD) + f.BOSClass = ICQBuddy + reactor.connectTCP('login.icq.com', 5238, f) reactor.run() -- cgit v1.2.1