How does sleekxmpp components work?
Question: This may sound dumb but I followed this tutorial:

<https://github.com/fritzy/SleekXMPP/wiki/Creating-a-SleekXMPP-Plugin>

and here's the component at the end that uses the XEP-0077 plugin that was
created:

    
    
    import sleekxmpp.componentxmpp
    
    class Example(sleekxmpp.componentxmpp.ComponentXMPP):
    
        def __init__(self, jid, password):
            sleekxmpp.componentxmpp.ComponentXMPP.__init__(self, jid, password, 'localhost', 8888)
    
            self.registerPlugin('xep_0030')
            self.registerPlugin('xep_0077')
            self.plugin['xep_0077'].setForm('username', 'password')
    
            self.add_event_handler("registered_user", self.reg)
            self.add_event_handler("unregistered_user", self.unreg)
    
        def reg(self, iq):
            msg = "Welcome! %s" % iq['register']['username']
            self.sendMessage(iq['from'], msg, mfrom=self.fulljid)
    
        def unreg(self, iq):
            msg = "Bye! %s" % iq['register']['username']
            self.sendMessage(iq['from'], msg, mfrom=self.fulljid)
    

But I don't know how to use it, also I can't find any sleekxmpp documentation
how to use this component. What I'm trying to accomplish here is to be able to
register/unregister users on an xmpp server from python.


Answer: Check out

<http://louizatakk.fedorapeople.org/sleekxmpp-1.0-Beta2-0/examples/config_component.py>

It will answer all of your questions. If not, post a comment with with the
follow-up questions below.

