XMPP xmpppy - User Authorization
mrnull at gmail.com
Sun Dec 14 06:47:31 CET 2008
In my own bot, using the latest xmpppy, I've been printing everything
going to the message handler to the screen. I've yet to see a
'subscribe' string. Has this changed?
James Mills wrote:
> On Wed, Nov 5, 2008 at 11:28 AM, James Mills
> <prologic at shortcircuit.net.au> wrote:
> > Can anyone shed any light on how I might
> > be able to react to "User Authorization Requests"
> > from other users on an XMPP server/network
> > using teh xmlpp  library ?
> I found out from having a peek at jabberbot 
> that it was as simple as parsing the message.
> Here's a code snippet:
> def messageHandler(self, cnx, message):
> text = message.getBody()
> user = message.getFrom()
> if text is not None:
> self.env.log.debug("<%s> %s" % (user, text))
> if " " in text:
> command, args = text.split(" ", 1)
> command, text = text, ""
> command = command.upper()
> if command == "SUBSCRIBE":
> reply = "Authorized."
> -- "Problems are solved by method"
More information about the Python-list