mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-26 16:26:24 +01:00
mod_muc/mod_muc_log.erl: The logging code expect nicknames to be in list() format.
SVN Revision: 1920
This commit is contained in:
parent
0f53fea903
commit
2678342c4a
@ -5,6 +5,9 @@
|
||||
|
||||
* src/mod_echo.erl: Fix call to exmpp_xml:get_cdata_as_list/1.
|
||||
|
||||
* src/mod_muc/mod_muc_log.erl: The logging code expect nicknames
|
||||
to be in list() format.
|
||||
|
||||
2009-02-23 Pablo Polvorin <pablo.polvorin@process-one.net>
|
||||
* src/ejabberd_c2s.erl, src/mod_echo.erl, src/mod_roster.erl,
|
||||
src/mod_roster_odbc.erl: Use exmpp_jid:to_binary/1 when possible.
|
||||
|
@ -138,7 +138,7 @@ init([Host, Opts]) ->
|
||||
file_format = FileFormat,
|
||||
css_file = CSSFile,
|
||||
access = AccessLog,
|
||||
lang = Lang,
|
||||
lang = list_to_binary(Lang),
|
||||
timezone = Timezone,
|
||||
spam_prevention = NoFollow,
|
||||
top_link = Top_link}}.
|
||||
@ -211,29 +211,29 @@ add_to_log2(text, {Nick, Packet}, Room, Opts, State) ->
|
||||
ok;
|
||||
{'undefined', SubEl} ->
|
||||
Message = {body, exmpp_xml:get_cdata_as_list(SubEl)},
|
||||
add_message_to_log(Nick, Message, Room, Opts, State);
|
||||
add_message_to_log(binary_to_list(Nick), Message, Room, Opts, State);
|
||||
{SubEl, _} ->
|
||||
Message = {subject, exmpp_xml:get_cdata_as_list(SubEl)},
|
||||
add_message_to_log(Nick, Message, Room, Opts, State)
|
||||
add_message_to_log(binary_to_list(Nick), Message, Room, Opts, State)
|
||||
end;
|
||||
|
||||
add_to_log2(roomconfig_change, _, Room, Opts, State) ->
|
||||
add_message_to_log("", roomconfig_change, Room, Opts, State);
|
||||
|
||||
add_to_log2(nickchange, {OldNick, NewNick}, Room, Opts, State) ->
|
||||
add_message_to_log(NewNick, {nickchange, OldNick}, Room, Opts, State);
|
||||
add_message_to_log(binary_to_list(NewNick), {nickchange, binary_to_list(OldNick)}, Room, Opts, State);
|
||||
|
||||
add_to_log2(join, Nick, Room, Opts, State) ->
|
||||
add_message_to_log(Nick, join, Room, Opts, State);
|
||||
add_message_to_log(binary_to_list(Nick), join, Room, Opts, State);
|
||||
|
||||
add_to_log2(leave, {Nick, Reason}, Room, Opts, State) ->
|
||||
case binary_to_list(Reason) of
|
||||
"" -> add_message_to_log(Nick, leave, Room, Opts, State);
|
||||
R -> add_message_to_log(Nick, {leave, R}, Room, Opts, State)
|
||||
"" -> add_message_to_log(binary_to_list(Nick), leave, Room, Opts, State);
|
||||
R -> add_message_to_log(binary_to_list(Nick), {leave, R}, Room, Opts, State)
|
||||
end;
|
||||
|
||||
add_to_log2(kickban, {Nick, Reason, Code}, Room, Opts, State) ->
|
||||
add_message_to_log(Nick, {kickban, Code, binary_to_list(Reason)}, Room, Opts, State).
|
||||
add_message_to_log(binary_to_list(Nick), {kickban, Code, binary_to_list(Reason)}, Room, Opts, State).
|
||||
|
||||
|
||||
%%----------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user