Ticket #3949: unique_guid_rev1.patch
File unique_guid_rev1.patch, 2.6 KB (added by , 7 years ago) |
---|
-
binaries/data/mods/public/gui/common/network.js
71 71 case 6: return translate("You have been banned"); 72 72 case 7: return translate("Playername in use. If you were disconnected, retry in few seconds"); 73 73 case 8: return translate("Server full"); 74 case 9: return translate("Player identifier in use, retry connecting"); 74 75 default: 75 76 warn("Unknown disconnect-reason ID received: " + id); 76 77 return sprintf(translate("\\[Invalid value %(id)s]"), { "id": id }); -
binaries/data/mods/public/gui/credits/texts/programming.json
176 176 {"nick": "Sandarac"}, 177 177 {"nick": "sanderd17", "name": "Sander Deryckere"}, 178 178 {"nick": "sathyam", "name": "Sathyam Vellal"}, 179 {"nick": "sbirmi", "name": "Sharad Birmiwal"}, 179 180 {"nick": "sbte", "name": "Sven Baars"}, 180 181 {"nick": "scroogie", "name": "André Gemünd"}, 181 182 {"nick": "scythetwirler", "name": "Casey X."}, -
source/network/NetHost.h
67 67 NDR_KICKED, 68 68 NDR_BANNED, 69 69 NDR_PLAYERNAME_IN_USE, 70 NDR_SERVER_FULL 70 NDR_SERVER_FULL, 71 NDR_PLAYERGUID_IN_USE 71 72 }; 72 73 73 74 class CNetHost -
source/network/NetServer.cpp
903 903 904 904 CAuthenticateMessage* message = (CAuthenticateMessage*)event->GetParamRef(); 905 905 CStrW username = SanitisePlayerName(message->m_Name); 906 CStr guid = message->m_GUID; 906 907 907 908 // Either deduplicate or prohibit join if name is in use 908 909 bool duplicatePlayernames = false; … … 919 920 return true; 920 921 } 921 922 923 // Disconnect user if the provided GUID is already in use 924 if (std::find_if( 925 server.m_Sessions.begin(), server.m_Sessions.end(), 926 [&guid] (const CNetServerSession* session) 927 { return session->GetGUID() == guid; }) != server.m_Sessions.end()) 928 { 929 session->Disconnect(NDR_PLAYERGUID_IN_USE); 930 return true; 931 } 932 922 933 // Disconnect banned usernames 923 934 if (std::find(server.m_BannedPlayers.begin(), server.m_BannedPlayers.end(), username) != server.m_BannedPlayers.end()) 924 935 {