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

def adhoc::Connect_Server_Command::cmdFirstStage (   self,
  conn,
  event 
)

Build the reply to complete the request

Definition at line 115 of file adhoc.py.

00115                                       :
        """Build the reply to complete the request"""
        frm = event.getFrom()
        to = event.getTo()
        room = irc_ulower(to.getNode())
        try:
            channel, server = room.split('%',1)
            channel = JIDDecode(channel)
        except ValueError:
            channel=''
            server=room
            sys.exc_clear()
        if channel == '':
            if self.transport.irc_connect('',server,'','',frm,Presence()):
                self.transport.xmpp_presence_do_update(Presence(),server,frm.getStripped())
                reply = event.buildReply('result')
                form = DataForm(typ='result',data=[DataField(value='Command completed.',typ='fixed')])
                reply.addChild(name='command',namespace=NS_COMMANDS,attrs={'node':event.getTagAttr('command','node'),'sessionid':self.getSessionID(),'status':'completed'},payload=[form])
                self._owner.send(reply)
                raise NodeProcessed
            else:
                self._owner.send(Error(event,ERR_CONFLICT))
                raise NodeProcessed
        else:
            self._owner.send(Error(event,ERR_ITEM_NOT_FOUND))
            raise NodeProcessed

class Disconnect_Server_Command(xmpp.commands.Command_Handler_Prototype):


Generated by  Doxygen 1.6.0   Back to index