mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-14 17:08:57 +01:00
Fix nick logging in mod_muc_log plaintext (#522)
This commit is contained in:
parent
25449a076f
commit
b67af5e036
@ -381,6 +381,11 @@ set_filemode(Fn, {FileMode, FileGroup}) ->
|
||||
ok = file:change_mode(Fn, list_to_integer(integer_to_list(FileMode), 8)),
|
||||
ok = file:change_group(Fn, FileGroup).
|
||||
|
||||
htmlize_nick(Nick1, html) ->
|
||||
htmlize(<<"<", Nick1/binary, ">">>, html);
|
||||
htmlize_nick(Nick1, plaintext) ->
|
||||
htmlize(<<?PLAINTEXT_IN/binary, Nick1/binary, ?PLAINTEXT_OUT/binary>>, plaintext).
|
||||
|
||||
add_message_to_log(Nick1, Message, RoomJID, Opts,
|
||||
State) ->
|
||||
#logstate{out_dir = OutDir, dir_type = DirType,
|
||||
@ -391,7 +396,7 @@ add_message_to_log(Nick1, Message, RoomJID, Opts,
|
||||
State,
|
||||
Room = get_room_info(RoomJID, Opts),
|
||||
Nick = htmlize(Nick1, FileFormat),
|
||||
Nick2 = htmlize(<<"<", Nick1/binary, ">">>, FileFormat),
|
||||
Nick2 = htmlize_nick(Nick1, FileFormat),
|
||||
Now = now(),
|
||||
TimeStamp = case Timezone of
|
||||
local -> calendar:now_to_local_time(Now);
|
||||
|
Loading…
Reference in New Issue
Block a user