diff options
author | Badlop <badlop@process-one.net> | 2008-01-16 10:08:17 +0000 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2008-01-16 10:08:17 +0000 |
commit | f361633f36b82509df27c1f23105e9f9896c1e54 (patch) | |
tree | 157bbf6eaec9c9deb6d451016f7b8bfec23d67fb /src/mod_muc/mod_muc_room.erl | |
parent | * doc/guide.tex: Improved the documentation of Binary (diff) |
* doc/guide.tex: Updated the names of log files.
* doc/guide.html: Likewise
* src/mod_muc/mod_muc_room.erl: Added log messages for room
destroy
* src/mod_caps.erl: Small beautify of log error messages
SVN Revision: 1155
Diffstat (limited to 'src/mod_muc/mod_muc_room.erl')
-rw-r--r-- | src/mod_muc/mod_muc_room.erl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mod_muc/mod_muc_room.erl b/src/mod_muc/mod_muc_room.erl index 75aec088..b7ced034 100644 --- a/src/mod_muc/mod_muc_room.erl +++ b/src/mod_muc/mod_muc_room.erl @@ -612,8 +612,12 @@ handle_event({destroy, Reason}, _StateName, StateData) -> [{xmlelement, "reason", [], [{xmlcdata, Reason}]}] end}, StateData), + ?INFO_MSG("Destroyed MUC room ~s with reason: ~p", + [jlib:jid_to_string(StateData#state.jid), Reason]), {stop, normal, StateData}; handle_event(destroy, StateName, StateData) -> + ?INFO_MSG("Destroyed MUC room ~s", + [jlib:jid_to_string(StateData#state.jid)]), handle_event({destroy, none}, StateName, StateData); handle_event({set_affiliations, Affiliations}, StateName, StateData) -> @@ -938,6 +942,8 @@ process_presence(From, Nick, {xmlelement, "presence", Attrs, _Els} = Packet, case (not (StateData1#state.config)#config.persistent) andalso (?DICT:to_list(StateData1#state.users) == []) of true -> + ?INFO_MSG("Destroyed MUC room ~s because it's temporary and empty", + [jlib:jid_to_string(StateData#state.jid)]), {stop, normal, StateData1}; _ -> {next_state, normal_state, StateData1} @@ -2396,7 +2402,7 @@ process_iq_owner(From, set, Lang, SubEl, StateData) -> {error, ?ERR_BAD_REQUEST} end; [{xmlelement, "destroy", _Attrs1, _Els1} = SubEl1] -> - ?INFO_MSG("Destroyed MUC room ~s by ~s", + ?INFO_MSG("Destroyed MUC room ~s by the owner ~s", [jlib:jid_to_string(StateData#state.jid), jlib:jid_to_string(From)]), destroy_room(SubEl1, StateData); Items -> |