Logo Search packages:      
Sourcecode: jabber-irc version File versions  Download package

def jep0133::Add_User_Command::cmdSecondStage (   self,
  conn,
  request 
)

Apply and save the config

Definition at line 60 of file jep0133.py.

00060                                          :
        """Apply and save the config"""
        form = DataForm(node=request.getTag(name='command').getTag(name='x',namespace=NS_DATA))
        session = request.getTagAttr('command','sessionid')
        if self.sessions.has_key(session):
            if self.sessions[session]['jid'] == request.getFrom():
                reply = request.buildReply('result')
                fromstripped = form.getField('accountjid').getValue().encode('utf8')
                if not self.userfile.has_key(fromstripped):
                    self.userfile[fromstripped] = {}
                    self.userfile.sync()
                reply.addChild(name='command',namespace=NS_COMMANDS,attrs={'node':request.getTagAttr('command','node'),'sessionid':session,'status':'completed'})
                self._owner.send(reply)
            else:
                self._owner.send(Error(request,ERR_BAD_REQUEST))
        else:
            self._owner.send(Error(request,ERR_BAD_REQUEST))   
        raise NodeProcessed

    def cmdCancel(self,conn,request):


Generated by  Doxygen 1.6.0   Back to index