greetings, questions, etc. (muc, offline, ...)

Clive Holloway clive.holloway at gmail.com
Sat Nov 24 16:07:17 UTC 2007


> > Kaolin Fire wrote:
> > The MUC implementation for DJabberd right now is quite minimal, but I
> > think people on this mailing list have mentioned making use of it
> > recently.

Yep, I have it working, using:

my $muc = DJabberd::Plugin::MUC->new;
$muc->set_config_subdomain("conference");
$muc->finalize;

and then including that in the plugins attribute of the vhost constructor.

If you haven't already seen it, check out the sixapart sample server
code - that gives some pretty good hints on how to get this working.

Just remember to either add conference.hostname to your DNS - or to
hack the srv lookup in DNS.pm - this was quickest for me, since I
still don't understand half of the code I'm ripping apart ;-)

Starting at line 40...

    my $real_hostname = $hostname;
    $real_hostname =~ s/conference\.//;

    # testing support
    if ($service eq "_xmpp-server._tcp") {
        my $endpt = DJabberd->fake_s2s_peer($hostname);
        if ($endpt) {
            $callback->($endpt);
            return;
        }
    }

    my $pkt = Net::DNS::Packet->new("$service.$real_hostname", "SRV", "IN");

I'm sure there's a better way of doing DNS lookups for services
generically, but this my hack fix for the amount of time I could spend
on it.

cLive ;-)


More information about the Djabberd mailing list