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

def adhoc::Connect_Registered_Users_Command::cmdFirstStage (   self,
  conn,
  request 
)

Build the reply to complete the request

Definition at line 70 of file adhoc.py.

00070                                         :
        """Build the reply to complete the request"""
        if request.getFrom().getStripped() in config.admins:
            for each in self.userfile.keys():
                conn.send(Presence(to=each, frm = config.jid, typ = 'probe'))
                if self.userfile[each].has_key('servers'):
                    for server in self.userfile[each]['servers']:
                        conn.send(Presence(to=each, frm = '%s@%s'%(server,config.jid), typ = 'probe'))
            reply = request.buildReply('result')
            form = DataForm(typ='result',data=[DataField(value='Command completed.',typ='fixed')])
            reply.addChild(name='command',namespace=NS_COMMANDS,attrs={'node':request.getTagAttr('command','node'),'sessionid':self.getSessionID(),'status':'completed'},payload=[form])
            self._owner.send(reply)
        else:
            self._owner.send(Error(request,ERR_FORBIDDEN))
        raise NodeProcessed

class Connect_Server_Command(xmpp.commands.Command_Handler_Prototype):


Generated by  Doxygen 1.6.0   Back to index