Getting MUC working...

Clive Holloway clive.holloway at gmail.com
Tue Oct 9 18:23:07 UTC 2007


Hi all,

I've been browsing the list archives, and I can't work out how to get MUC
working - and examples in the wild are non-existent.

I've been playing with the six apart example from the repo, and just about
understand the user, roster and vcard setup, but I'm having trouble with the
chatroom setup. Since there's no clear examples on this, I've been trying
semi random constructors for DJabberd::Plugin::MUC::Room without really
knowing what I'm doing here.

What I want to do is create a few permanent rooms at startup with the
following criteria:

- disco doesn't need to work
- users need to be able to join the rooms without invitation
- users can invite others

I have a feeling I'm running around the right code without quite getting it.
Here's where I'm at (snippet):

--

my $rs = DJabberd::RosterStorage::Dummy->new;
$rs->finalize;

my $vcard = DJabberd::Plugin::VCard::SQLite->new;
$vcard->set_config_storage("$Bin/roster.sqlite");
$vcard->finalize;

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


my $vhost = DJabberd::VHost->new(
                server_name => 'test-domain.com',
                require_ssl => 0,
                s2s         => 1,
                plugins     => [
                    DJabberd::Authen::Dummy->new,
                    $rs,
                    $vcard,
                    $muc,
                    DJabberd::Delivery::Local->new,
                    DJabberd::Delivery::S2S->new,
                ],
            );

# I'm sure this is wrong, but this was my last stab
my $room = DJabberd::Plugin::MUC::Room->new( 'testroom', 'test-domain.com',
$vhost );

my $server = DJabberd->new(
                 daemonize => $daemonize,
             );

$server->add_vhost($vhost);
$server->run;

--

Can someone point me in the right direction? I'm learning quite a bit from
this code (thanks all :) but I think my OO has enough gaps in it right now
to make this harder than I feel it should be.

Should I be attempting to use the DJabberd modules for this? Or should I be
using an external component? (and if so, which?). The last solid thread on
MUC that I found was:

http://lists.danga.com/pipermail/djabberd/2006-October/000185.html

and that's not exactly encouraging :) Have things changed since then?

Any input appreciated.

cLive ;-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/djabberd/attachments/20071009/75df1868/attachment.htm


More information about the Djabberd mailing list