summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2013-02-21 13:17:25 +0100
committerBadlop <badlop@process-one.net>2013-03-14 10:25:41 +0100
commit9c41abde101395111efcda16aa2fd9625f4c6207 (patch)
tree95fc9194e9693440656b456f899de812efaa3f21 /src
parentFix bug when displaying offline messages in WebAdmin (diff)
list_to_integer/2 only works in OTP R14 and newer
Diffstat (limited to '')
-rw-r--r--src/mod_muc/mod_muc_log.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mod_muc/mod_muc_log.erl b/src/mod_muc/mod_muc_log.erl
index 27f1340d..71dc8a0b 100644
--- a/src/mod_muc/mod_muc_log.erl
+++ b/src/mod_muc/mod_muc_log.erl
@@ -321,9 +321,15 @@ htmlize_nick(Nick1, html) ->
htmlize_nick(Nick1, plaintext) ->
htmlize(?PLAINTEXT_IN++Nick1++?PLAINTEXT_OUT, plaintext).
+%% list_to_integer/2 was introduced in OTP R14
+-ifdef(SSL40).
set_filemode(Fn, {FileMode, FileGroup}) ->
ok = file:change_mode(Fn, list_to_integer(integer_to_list(FileMode), 8)),
ok = file:change_group(Fn, FileGroup).
+-else.
+set_filemode(Fn, {_FileMode, FileGroup}) ->
+ ok = file:change_group(Fn, FileGroup).
+-endif.
add_message_to_log(Nick1, Message, RoomJID, Opts, State) ->
#logstate{out_dir = OutDir,