[Tutor] jabber

G Kiran goki75 at vsnl.net
Tue Sep 30 05:44:06 EDT 2003


i was trying to connect to a jabber server as a client using jabber library
but my id doesnot come on my other cient(miranda IM) running with a
different user id
whats the problem???


import jabber
import re

server = "jabber.org"
username = "salil_one"
password = "rayhelix"

class myclnt(jabber.Client):
      def __init__(self, host, username, password, port=5222, debug=0,
log=0):
        jabber.Client.__init__(self, host, port, debug, log)
        self.connect()
        print "Connected"
        self.login()
        self.sendInitPresence()
        self.requestRoster()

  def login(self):
        if self.auth(username, password, 'Test'):
              print "Logged in"
       else:
              raise RuntimeError("Failed to login")

while (1):
  try:
          clnt = myclient(server, username, password)
 except Exception, e:
      print "There was an problem trying again"




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.521 / Virus Database: 319 - Release Date: 9/23/2003




More information about the Tutor mailing list