mod_muc_admin - Administrative MUC features

Name: mod_muc_admin
Purpose: Additional ejabberd commands and WebAdmin pages
Author: Badlop
Type: Module
Requirements: ejabberd 1.1.x for basic features. ejabberd 2.0.2 or higher for WebAdmin pages
Download: ejabberd-modules

This module implements several additional administrative commands that can be executed using ejabberdctl, ejabberd_xmlrpc...

This module also provides a few pages that display information about the existing rooms, and some of their characteristics.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Changing role of user

Would it be possible to add a set_room_role function to this to change a user's role in a room?

Roles are temporary.

Roles are temporary. As soon as the occupant leaves the room, he loses the role. Why bothering changing the role programmatically? Isn't it better to set the affiliation?

I'm trying to revoke/grant

I'm trying to revoke/grant voice to an occupant in the room. I had a look at the set_room_affiliation function and noticed it doesn't send the updated affiliation to the room occupants if that user is in the room at the time. Is this by design?

Re

The behavior you see is not a bug, it is a misfeature.

In other words: the source code doesn't even attempt to send the stanzas to the occupants because no developer implemented such feature.

webadmin returns 'Not Found'

We are running ejabberd 2.1.2 and installed the ejabberd-2.0.x branch of this module. Upon browsing the webadmin, the hooks for web_menu_main/2 and web_menu_host/3 appear to work since the menu items appear in the left navigation area; however, web_page_main/2 and web_page_host/3 do not appear to be called by the webadmin hooks because instead of displaying information the page simply displays:

Not Found

without logging anything to ejabberd.log, erlang.log, or erl_crash.dump.

The code in mod_muc_admin.erl appears to conform to the documentation at http://www.ejabberd.im/webadmin-hooks. The only suspicious thing I could find was on line 90 where there is a call to delete the webadmin_user hook to web_user when there is no web_user function in the module and no addition of the hook.

Does this module need some tweaks to work with the 2.1 series?

Did you figure out why this

Did you figure out why this happens? Happens to me too, using ejabberd 2.1.5 compiled from source.

Use "trunk" instead.

phrackcreak wrote:

We are running ejabberd 2.1.2 and installed the ejabberd-2.0.x branch of this module.

You can install the "trunk" version of those modules with any ejabberd 2.1.*

The trunk version doesn't

The trunk version doesn't work because it's meant to be compiled with a higher version than the ejabberd 2.1.* which is built under R12B erl
You'll get errors like these:

beam/beam_load.c(1313): Error loading module gen_mod:
use of opcode 153; this emulator supports only up to 137

ejabberd crashes when using ejabberdctl create_room

running ejabberd 2.1.0 with erlang 12B5. Am I doing something wrong or is there a bug?

# ejabberdctl create_room mktest1 jabbertest.domain.com jabbertest.domain.com
Failed RPC connection to the node 'ejabberd@jabbertest.domain.com': {'EXIT',
{badarg,
[{ets,
lookup,
[local_config,
ejabberdctl_access_commands]},
{ejabberd_config,
get_local_option,
1},
{ejabberd_ctl,
get_accesscommands,
0},
{ejabberd_ctl,
process,
1},
{rpc,
'-handle_call/3-fun-0-',
5}]}}

I got the issue cleared up.

I got the issue cleared up. Basically, mod_muc_admin doesn't do any verification of valid input, it just jams it into ejabberd and if you put something invalid into an option, it can cause the whole thing to puke. change_room_option also does not support all available options.

I have tried to start this

I have tried to start this module and got this error:

=ERROR REPORT==== 2009-07-24 09:22:41 ===
E(<0.3423.0>:gen_mod:73) : {undef,      
                            [{ejabberd_commands,register_commands,
                              [[{ejabberd_commands,muc_online_rooms,
                                 [muc],                            
                                 "List existing rooms ('global' to get all vhosts)",
                                 [],mod_muc_admin,muc_online_rooms,                
                                 [{host,string}],                                  
                                 {rooms,{list,{room,string}}}},
...

ejabberd-2.0.5

If you have ejabberd 2.0.5,

If you have ejabberd 2.0.5, you must install the mod_muc_admin of branches/ejabberd-2.0.x, not of trunk/

вот лог компиляции: [root@srv

вот лог компиляции:

[root@srv ejabberd-2.0.x]# ./build.sh
Recompile: src/mod_muc_admin
src/mod_muc_admin.erl:12: Warning: behaviour gen_mod undefined

Я утсановил модуль из этого

Я утсановил модуль из этого бранча, но получаю ту же ошибку

Syndicate content