From aa68cff85e424ffa7a4acc84b40391326f9da900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Mon, 19 Feb 2007 16:56:06 +0000 Subject: [PATCH] * src/mod_muc/mod_muc_room.erl: Added an option set affiliations. SVN Revision: 734 --- ChangeLog | 2 ++ src/mod_muc/mod_muc_room.erl | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 757784bb8..c4e30e4af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2007-02-19 Mickael Remond + * src/mod_muc/mod_muc_room.erl: Added an option set affiliations. + * doc/api/*: Added Erlang documentation generation script (EJAB-188). * doc/version.tex: Updated. * src/ejabberd.app: Updated. diff --git a/src/mod_muc/mod_muc_room.erl b/src/mod_muc/mod_muc_room.erl index 5a821f8f1..6c7d06105 100644 --- a/src/mod_muc/mod_muc_room.erl +++ b/src/mod_muc/mod_muc_room.erl @@ -621,6 +621,9 @@ handle_event({destroy, Reason}, _StateName, StateData) -> handle_event(destroy, StateName, StateData) -> handle_event({destroy, none}, StateName, StateData); +handle_event({set_affiliations, Affiliations}, StateName, StateData) -> + {next_state, StateName, StateData#state{affiliations = Affiliations}}; + handle_event(_Event, StateName, StateData) -> {next_state, StateName, StateData}. @@ -664,12 +667,12 @@ handle_sync_event({get_disco_item, JID, Lang}, _From, StateName, StateData) -> end, {reply, Reply, StateName, StateData}; handle_sync_event(get_config, _From, StateName, StateData) -> - {reply, StateData#state.config, StateName, StateData}; + {reply, {ok, StateData#state.config}, StateName, StateData}; handle_sync_event(get_state, _From, StateName, StateData) -> - {reply, StateData, StateName, StateData}; + {reply, {ok, StateData}, StateName, StateData}; handle_sync_event({change_config, Config}, _From, StateName, StateData) -> {result, [], NSD} = change_config(Config, StateData), - {reply, NSD#state.config, StateName, NSD}; + {reply, {ok, NSD#state.config}, StateName, NSD}; handle_sync_event(_Event, _From, StateName, StateData) -> Reply = ok, {reply, Reply, StateName, StateData}.