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.

how to use

how to use set_room_affiliation?
i call command below, and it shows problem
command
./ejabberdctl set_room_affiliation room1 conference.mydomain.com admin@mydomain.com admin

return:

Problem 'error {badmatch,ok}' occurred executing the command.
Stacktrace: [{mod_muc_admin,set_room_affiliation,4,
                            [{file,"../mod_muc_admin.erl"},{line,825}]},
             {ejabberd_ctl,call_command,3,
                           [{file,"src/ejabberd_ctl.erl"},{line,293}]},
             {ejabberd_ctl,try_call_command,3,
                           [{file,"src/ejabberd_ctl.erl"},{line,269}]},
             {ejabberd_ctl,process2,3,
                           [{file,"src/ejabberd_ctl.erl"},{line,218}]},
             {ejabberd_ctl,process,1,
                           [{file,"src/ejabberd_ctl.erl"},{line,203}]},
             {rpc,'-handle_call_call/6-fun-0-',5,
                  [{file,"rpc.erl"},{line,205}]}]

muc cleanup

how i can set muc clean up for empty mucs and not used form 24 hours using webadmin

and if there is full help list ??

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?

muc clean up

how i can set muc clean up for empty mucs and not used form 24 hours using webadmin

and if there is full help list ??

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

"Not Found" again

I built r1133 of mod_muc_admin (on trunk, last updated two days ago), for use with ejabberd 2.1.10 on ubuntu 12.04. I'm also seeing "Not Found" in the web admin interface when I click on the "List of Rooms" link. I'm not getting that "Error loading module gen_mod", but the following turns up in ejabberd.log.

=ERROR REPORT==== 2012-10-19 21:29:46 ===
E(<0.555.0>:ejabberd_hooks:335) : {{badrecord,state},
                                   [{mod_muc_admin,build_info_room,1},
                                    {mod_muc_admin,
                                     '-build_info_rooms/1-lc$^0/1-0-',1},
                                    {mod_muc_admin,make_rooms_page,3},
                                    {mod_muc_admin,web_page_main,2},
                                    {ejabberd_hooks,run_fold1,4},
                                    {ejabberd_web_admin,process_admin,2},
                                    {ejabberd_http,process,2},
                                    {ejabberd_http,process_request,1}]}
running hook: {webadmin_page_main,
                  [{request,'GET',
                       ["muc","rooms"],
                       [{nokey,[]}],
                       {"user","example.com"},
                       {auth_jid,
                           {"user@example.com","password"},
                           {jid,"user","example.com",[],"user",
                               "example.com",[]}},
                       "en-US",[],
                       {{192,168,0,152},58644},
                       "jabber.example.com",5284,https,
                       [{'Authorization',
                            "Basic aXJvbnNAYmxhY2twaXhlbC5jb206d3JhZk5lZGZ1"},
                        {'Referer',
                            "https://jabber.example.com:5284/admin/muc/"},
                        {'Connection',"keep-alive"},
                        {'Accept-Encoding',"gzip, deflate"},
                        {'Accept-Language',"en-US,en;q=0.5"},
                        {'Accept',
                            "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"},
                        {'User-Agent',
                            "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:16.0) Gecko/20100101 Firefox/16.0"},
                        {'Host',"jabber.example.com:5284"}]}]}

Suggestions are appreciated.

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

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

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

Things to try

Had the same error until I ensured correct permissions, and that the ejabberd process was not running while doing the build.
See if that solves it for you.

Syndicate content