Add client.friendlyRemoteAddress() for 'clean' remote IP

This commit is contained in:
Bryan Ashby
2022-06-04 17:39:48 -06:00
parent 0b11e629a6
commit 1ba866f2ca
4 changed files with 8 additions and 2 deletions

View File

@@ -121,7 +121,7 @@ const PREDEFINED_MCI_GENERATORS = {
UD : function themeId(client) { return userStatAsString(client, UserProps.ThemeId, ''); },
UC : function loginCount(client) { return userStatAsCountString(client, UserProps.LoginCount, 0); },
ND : function connectedNode(client) { return client.node.toString(); },
IP : function clientIpAddress(client) { return client.remoteAddress.replace(/^::ffff:/, ''); }, // convert any :ffff: IPv4's to 32bit version
IP : function clientIpAddress(client) { return client.remoteAddress.friendlyRemoteAddress() },
ST : function serverName(client) { return client.session.serverName; },
FN : function activeFileBaseFilterName(client) {
const activeFilter = FileBaseFilters.getActiveFilter(client);