MUC Room Owner

Hey all,
We are using ejabberd for a project, basically users "create"/are assigned to a room name that is determined on the fly. Basically we want to prevent the room creator from administering/moderating their room and only let admins administer/moderate the rooms.

Is there anyway to configure this at all? Perhaps like setting the creator to our admin account?
I have been looking through the source code in mod_muc and mod_muc_room to no real help.

Does anyone have any idea?

Cheers,
Josh

Worked it out...

Found a fix finally...
Line 116 of mod_muc_room.erl. Changed 'owner' to member.
State = set_affiliation(Creator, member,
It still respects admins as moderators as well which is awesome.

Didn't really work. It ends

Didn't really work. It ends up failing to create the room and cannot chat... Hmm

Your simple chaneg works for me

jishy wrote:

Didn't really work. It ends up failing to create the room and cannot chat... Hmm

The change that you mentioned looks correct to me:

--- a/src/mod_muc/mod_muc_room.erl
+++ b/src/mod_muc/mod_muc_room.erl
@@ -113,7 +113,7 @@ start_link(Host, ServerHost, Access, Room, HistorySize, RoomShaper, Opts) ->
 init([Host, ServerHost, Access, Room, HistorySize, RoomShaper, Creator, _Nick, DefRoomOpts]) ->
     process_flag(trap_exit, true),
     Shaper = shaper:new(RoomShaper),
-    State = set_affiliation(Creator, owner,
+    State = set_affiliation(Creator, member,
                            #state{host = Host,
                                   server_host = ServerHost,
                                   access = Access,

A normal user can join a room, and it's created correctly, he can chat, but he can't configure it, etc.

=INFO REPORT==== 30-Aug-2010::23:51:04 ===
I(<0.512.0>:mod_muc_room:126) : Created MUC room asdasd@conference.localhost
by badlop3@localhost/work

If you want all the new rooms to be persistent, configure in ejabberd.cfg

{modules, [
  ...
  {mod_muc,      [
                  {default_room_options, [{persistent, true}]},
...
Syndicate content