Bots, components, etc.
mart at degeneration.co.uk
Mon Dec 31 18:39:44 UTC 2007
Sorry I took so long to get back to you. I wasn't able to post to this
list over the holiday period.
Gavin Carr wrote:
> Hi all,
> Just getting to my first serious playing with djabberd, using svn trunk.
> I've got the basics up nicely - auth, rosters, and vcards - and am now
> trying to play with bots, components, and MUCs, with rather less success.
> I'm trying to use djabberd.conf style configuration, but can't figure out
> the proper incantations for things like bots and MUCs. I'm trying to setup
> an eliza at example.com bot in my main vhost, for example, using this:
> <Plugin DJabberd::Bot::Eliza>
> NodeName eliza
> Is this correct? It almost works, and I can add eliza at example.com as a
> buddy and chat away ok, but I'm not getting authorised for presence updates?
> (An older version references DJabberd::Plugin::Bot, but that's no longer in
> svn, so I assume that's obsolete?)
I'm not really all that familiar with the bot code, but a quick scan of
the DJabberd::Bot class suggests to me that it doesn't support
responding to presence subscription requests.
I suspect this is because LiveJournal's bot -- really the only sane bot
implementation right now -- is hardcoded into LiveJournal's
RosterStorage implementation. Adding some code to make bots
automatically respond to subscription requests ought not to be too hard,
> I also tried playing with DJabberd::Component::Example, but that and
> DJabberd::Component suggest this should be used as follows:
> <Plugin DJabberd::Plugin::Component>
> Subdomain example
> Class DJabberd::Component::Example
> Greeting Hello, world!
> but DJabberd::Plugin::Component doesn't appear to be in svn?
That's some old, broken documentation you've found there.
Components are now themselves delivery plugins, so you just load them
Greeting Hello, world!
The "subdomain" concept was redesigned, too. To achieve what the example
above set out to do, you'll want this more complete example:
# Other configuration for example.com here
Greeting Hello, world!
It's worth noting that since the documentation in that Example component
is out of date it's possible/likely that the implementation is as well,
so you may find that it doesn't work correctly.
It's also worth noting the currently-undocumented caveat that adding a
Subdomain to a VHost will stop DJabberd from automatically adding the
default set of delivery plugins to that VHost, so you'll need to
explicitly load DJabberd::Delivery::Local and optionally
DJabberd::Delivery::S2S into the example.com VHost above if you aren't
doing so already.
MUC is no longer actually a component, but you load it in the same way
as the component above, just using the name DJabberd::Plugin::MUC. The
MUC support itself is not complete as far as I'm aware, but others on
the mailing list have had some success in using it.
More information about the Djabberd