summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mod_muc_log.erl8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mod_muc_log.erl b/src/mod_muc_log.erl
index 08498869..b37f7cc7 100644
--- a/src/mod_muc_log.erl
+++ b/src/mod_muc_log.erl
@@ -440,12 +440,10 @@ add_message_to_log(Nick1, Message, RoomJID, Opts,
{_, _, Microsecs} = Now,
STimeUnique = io_lib:format("~ts.~w",
[STime, Microsecs]),
- catch fw(F,
- list_to_binary(
- io_lib:format("<a id=\"~ts\" name=\"~ts\" href=\"#~ts\" "
+ fw(F, io_lib:format("<a id=\"~ts\" name=\"~ts\" href=\"#~ts\" "
"class=\"ts\">[~ts]</a> ",
[STimeUnique, STimeUnique, STimeUnique, STime])
- ++ Text),
+ ++ Text,
FileFormat),
file:close(F),
ok.
@@ -529,7 +527,7 @@ fw(F, S, FileFormat) when is_atom(FileFormat) ->
fw(F, S, [], FileFormat).
fw(F, S, O, FileFormat) ->
- S1 = (str:format(binary_to_list(S) ++ "~n", O)),
+ S1 = <<(str:format(S, O))/binary, "\n">>,
S2 = case FileFormat of
html ->
S1;