Bots, components, etc.
Martin Atkins
mart at degeneration.co.uk
Sat Jan 5 18:44:17 UTC 2008
Gavin Carr wrote:
>> 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,
>> though.
>
> Thanks, that sounds correct to me. I'm still getting my head around how
> djabberd hangs together, so not sure my djabberd-fu is up to it just yet,
> but if no one beats me to it I'm might try and figure this out.
>
I just checked in a change to DJabberd::Bot which makes all bots respond
automatically to roster subscriptions.
However, the way bots are implemented is a complete hack and so I'm not
sure that this'll work properly in all cases. Ideally we'd rethink the
way clients are represented in DJabberd so that bots can actually be
fully-fledged clients rather than the "thing that happens to have some
of the methods that clients normally have" that they are now.
Earlier today I also checked in API documentation for
DJabberd::Component and the classes related to that, which you may find
useful.
More information about the Djabberd
mailing list