diff --git a/core/color_codes.js b/core/color_codes.js index 2032f057..e07b805e 100644 --- a/core/color_codes.js +++ b/core/color_codes.js @@ -110,7 +110,8 @@ function renegadeToAnsi(s, client) { result += s.substr(lastIndex, m.index - lastIndex) + attr; } else if(m[4] || m[1]) { // |AA MCI code or |Cx## movement where ## is in m[1] - const val = getPredefinedMCIValue(client, m[4] || m[1], m[2]) || (m[0]); // value itself or literal + let val = getPredefinedMCIValue(client, m[4] || m[1], m[2]); + val = _.isString(val) ? val : m[0]; // value itself or literal result += s.substr(lastIndex, m.index - lastIndex) + val; } else if(m[5]) { // || -- literal '|', that is. diff --git a/core/predefined_mci.js b/core/predefined_mci.js index 9888ba5e..5a04ff07 100644 --- a/core/predefined_mci.js +++ b/core/predefined_mci.js @@ -95,7 +95,7 @@ const PREDEFINED_MCI_GENERATORS = { ST : function serverName(client) { return client.session.serverName; }, FN : function activeFileBaseFilterName(client) { const activeFilter = FileBaseFilters.getActiveFilter(client); - return activeFilter ? activeFilter.name : ''; + return activeFilter ? activeFilter.name : '(Unknown)'; }, DN : function userNumDownloads(client) { return userStatAsString(client, 'dl_total_count', 0); }, // Obv/2 DK : function userByteDownload(client) { // Obv/2 uses DK=downloaded Kbytes