From da7e53fe3cceab84b53b1e4680b5def5bcdc9d78 Mon Sep 17 00:00:00 2001 From: Badlop Date: Tue, 16 Nov 2010 02:13:58 +0100 Subject: [PATCH] Temporary workaround for starting stored rooms --- src/mod_muc/mod_muc_room.erl | 3 +++ src/mod_muc/mod_muc_room.hrl | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/mod_muc/mod_muc_room.erl b/src/mod_muc/mod_muc_room.erl index 572658250..48cba84d4 100644 --- a/src/mod_muc/mod_muc_room.erl +++ b/src/mod_muc/mod_muc_room.erl @@ -3286,6 +3286,9 @@ remove_nonmembers(StateData) -> set_opts([], StateData) -> StateData; +%% TODO: fix the calls to this function, so this clause isn't needed +set_opts([#muc_room_opt{opt = Opt, val = Val} | Opts], StateData) -> + set_opts([{Opt, Val} | Opts], StateData); set_opts([{Opt, Val} | Opts], StateData) -> NSD = case Opt of title -> StateData#state{config = (StateData#state.config)#config{title = Val}}; diff --git a/src/mod_muc/mod_muc_room.hrl b/src/mod_muc/mod_muc_room.hrl index f1e9063a8..024589533 100644 --- a/src/mod_muc/mod_muc_room.hrl +++ b/src/mod_muc/mod_muc_room.hrl @@ -80,3 +80,6 @@ -record(muc_online_users, {us, room, host}). + +%% Copied from mod_muc.erl +-record(muc_room_opt, {name_host, opt, val}).