diff --git a/resources/EGRP-Playerlist/server.lua b/resources/EGRP-Playerlist/server.lua index 233c30fb6..0dabc0d62 100644 --- a/resources/EGRP-Playerlist/server.lua +++ b/resources/EGRP-Playerlist/server.lua @@ -26,7 +26,12 @@ AddEventHandler('Bad-ServerList:SetupImg', function() avatars[license] = Config.Default_Profile; end if (discordName ~= nil) then - discordNames[license] = discordName; + -- Custom adjustment to manage new Discord Username format + if (string.sub(discordName, -2) == "#0") then + discordNames[license] = string.sub(discordName, 1, -3); + else + discordNames[license] = discordName; + end else discordNames[license] = Config.Discord_Not_Found; end @@ -53,7 +58,12 @@ AddEventHandler('Bad-ServerList:SetupRestart', function(src) avatars[license] = Config.Default_Profile;; end if (discordName ~= nil) then - discordNames[license] = discordName; + -- Custom adjustment to manage new Discord Username format + if (string.sub(discordName, -2) == "#0") then + discordNames[license] = string.sub(discordName, 1, -3); + else + discordNames[license] = discordName; + end else discordNames[license] = Config.Discord_Not_Found; end