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

def jep0133::Edit_Admin_List_Command::cmdFirstStage (   self,
  conn,
  request 
)

Set the session ID, and return the form containing the current administrators

Definition at line 90 of file jep0133.py.

00090                                           :
            """Set the session ID, and return the form containing the current administrators"""
            if request.getFrom().getStripped() in administrators:
               # Setup session ready for form reply
               session = self.getSessionID()
               sessions[session] = {'jid':request.getFrom(),'actions':{'cancel':self.cmdCancel,'next':self.cmdSecondStage}}
               # Setup form with existing data in
               reply = request.buildReply('result')
               form = DataForm(title='Editing the Admin List',data=['Fill out this form to edit the list of entities who have administrative privileges', DataField(typ='hidden',name='FORM_TYPE',value=NS_ADMIN),DataField(label='The Admin List', typ='jid-multi', name='adminjids',value=self.administrators)])
               replypayload = [Node('actions',attrs={'execute':'next'},payload=[Node('next')]),form]
               reply.addChild(name='command',attrs={'xmlns':NS_COMMAND,'node':request.getTagAttr('command','node'),'sessionid':session,'status':'executing'},payload=replypayload)
               self.jabber.send(reply)
            else:
               self.jabber.send(Error(ERR_FORBIDDEN,request))
            raise NodeProcessed
               
      def cmdSecondStage(self,conn,request):


Generated by  Doxygen 1.6.0   Back to index