Changeset 173

Show
Ignore:
Timestamp:
06/12/02 09:51:54 (6 years ago)
Author:
sholloway
Message:

Added SetPasword? method

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/RBJabber/RBJabber/Client.py

    r168 r173  
    153153        strXML = '<username>%s</username><password>%s</password>' % (username, password) 
    154154        query = iqQuery.iqQuery(self, callback) 
    155         query.SendQuery("jabber:iq:register", '', 'set', strXML) 
     155        query.SendQuery("jabber:iq:register", self.ServerJID, 'set', strXML) 
     156        return query 
     157 
     158    def SetPassword(self, password, callback=None): 
     159        """Registers a new password with the Jabber server.   
     160        Assumes user is already authenticated and a basic registration protocol. 
     161 
     162        Returns the iqQuery instance that is sent. 
     163 
     164        See also: iqQuery""" 
     165        import iqQuery 
     166        strXML = '<password>%s</password>' % password 
     167        query = iqQuery.iqQuery(self, callback) 
     168        query.SendQuery("jabber:iq:register", self.ServerJID, 'set', strXML) 
    156169        return query 
    157170