mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +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_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>
|
2009-02-23 Pablo Polvorin <pablo.polvorin@process-one.net>
|
||||||
* src/ejabberd_c2s.erl, src/mod_echo.erl, src/mod_roster.erl,
|
* 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.
|
src/mod_roster_odbc.erl: Use exmpp_jid:to_binary/1 when possible.
|
||||||
|
@ -138,7 +138,7 @@ init([Host, Opts]) ->
|
|||||||
file_format = FileFormat,
|
file_format = FileFormat,
|
||||||
css_file = CSSFile,
|
css_file = CSSFile,
|
||||||
access = AccessLog,
|
access = AccessLog,
|
||||||
lang = Lang,
|
lang = list_to_binary(Lang),
|
||||||
timezone = Timezone,
|
timezone = Timezone,
|
||||||
spam_prevention = NoFollow,
|
spam_prevention = NoFollow,
|
||||||
top_link = Top_link}}.
|
top_link = Top_link}}.
|
||||||
@ -211,29 +211,29 @@ add_to_log2(text, {Nick, Packet}, Room, Opts, State) ->
|
|||||||
ok;
|
ok;
|
||||||
{'undefined', SubEl} ->
|
{'undefined', SubEl} ->
|
||||||
Message = {body, exmpp_xml:get_cdata_as_list(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, _} ->
|
{SubEl, _} ->
|
||||||
Message = {subject, exmpp_xml:get_cdata_as_list(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;
|
end;
|
||||||
|
|
||||||
add_to_log2(roomconfig_change, _, Room, Opts, State) ->
|
add_to_log2(roomconfig_change, _, Room, Opts, State) ->
|
||||||
add_message_to_log("", roomconfig_change, Room, Opts, State);
|
add_message_to_log("", roomconfig_change, Room, Opts, State);
|
||||||
|
|
||||||
add_to_log2(nickchange, {OldNick, NewNick}, 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_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) ->
|
add_to_log2(leave, {Nick, Reason}, Room, Opts, State) ->
|
||||||
case binary_to_list(Reason) of
|
case binary_to_list(Reason) of
|
||||||
"" -> add_message_to_log(Nick, leave, Room, Opts, State);
|
"" -> add_message_to_log(binary_to_list(Nick), leave, Room, Opts, State);
|
||||||
R -> add_message_to_log(Nick, {leave, R}, Room, Opts, State)
|
R -> add_message_to_log(binary_to_list(Nick), {leave, R}, Room, Opts, State)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
add_to_log2(kickban, {Nick, Reason, Code}, Room, Opts, State) ->
|
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