From 0d6b3b00c3bf9329d86bc0eb5d2997c24496e9f2 Mon Sep 17 00:00:00 2001 From: Alexander Gould Date: Wed, 14 Oct 2015 16:15:57 -0400 Subject: [PATCH] slashes are replaced with %'s when writing log files --- src/log.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/log.js b/src/log.js index 7da01d72..70e5a91a 100644 --- a/src/log.js +++ b/src/log.js @@ -34,7 +34,9 @@ module.exports.write = function(user, network, chan, msg) { } fs.appendFile( - path + "/" + chan + ".log", + // Quick fix to escape pre-escape channel names that contain % using %%, + // and / using %. **This does not escape all reserved words** + path + "/" + chan.replace(/%/g, "%%").replace(/\//g, "%") + ".log", line + "\n", function(e) { if (e) {