diff --git a/src/userLog.js b/src/userLog.js index 7cbe5064..e9f436ec 100644 --- a/src/userLog.js +++ b/src/userLog.js @@ -39,7 +39,9 @@ module.exports.write = function(user, network, chan, msg) { path + "/" + chan.replace(/%/g, "%%").replace(/\//g, "%") + ".log", line + "\n", function(e) { - log.error("Failed to write user log", e); + if (e) { + log.error("Failed to write user log", e); + } } ); };