From 6d7c241a6f2dcbf1c1bdb4ae2d311b9428264a72 Mon Sep 17 00:00:00 2001 From: Badlop Date: Mon, 15 Apr 2013 12:09:11 +0200 Subject: [PATCH] Fix to work with ejabberd master --- mod_muc_admin/src/mod_muc_admin.erl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mod_muc_admin/src/mod_muc_admin.erl b/mod_muc_admin/src/mod_muc_admin.erl index 141fb6f..aec0d97 100644 --- a/mod_muc_admin/src/mod_muc_admin.erl +++ b/mod_muc_admin/src/mod_muc_admin.erl @@ -171,9 +171,9 @@ muc_online_rooms(ServerHost) -> fun({_, {Roomname, Host}, _}, Results) -> case MUCHost of global -> - [Roomname ++ "@" ++ Host | Results]; + [str:join([Roomname, Host], "@") | Results]; Host -> - [Roomname ++ "@" ++ Host | Results]; + [str:join([Roomname, Host], "@") | Results]; _ -> Results end @@ -634,7 +634,7 @@ act_on_room(destroy, {N, H, Pid}, SH) -> gen_fsm:send_all_state_event( Pid, {destroy, "Room destroyed by rooms_unused_destroy."}), mod_muc:room_destroyed(H, N, Pid, SH), - mod_muc:forget_room(H, N); + mod_muc:forget_room(SH, H, N); act_on_room(list, _, _) -> ok. @@ -876,6 +876,8 @@ find_host(global) -> global; find_host("global") -> global; +find_host(ServerHost) when is_list(ServerHost) -> + find_host(list_to_binary(ServerHost)); find_host(ServerHost) -> - gen_mod:get_module_opt_host(ServerHost, mod_muc, "conference.@HOST@"). + gen_mod:get_module_opt_host(ServerHost, mod_muc, <<"conference.@HOST@">>).