X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fusers.cpp;h=fd4afbcef7a643b7bd061ed07ca240ba266e63bc;hb=419537e7453928af2fde6648e87085a27e443486;hp=2585443126c8f85a40cc5617d23679e2a3c72eb9;hpb=3ef3047681f0813d8f1d06939eaa2ef378d99505;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/users.cpp b/src/users.cpp index 258544312..fd4afbcef 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -26,8 +26,6 @@ #include "inspircd.h" #include "xline.h" -already_sent_t LocalUser::already_sent_id = 0; - bool User::IsNoticeMaskSet(unsigned char sm) { if (!isalpha(sm)) @@ -76,8 +74,12 @@ User::User(const std::string& uid, Server* srv, int type) ServerInstance->Logs->Log("USERS", LOG_DEBUG, "New UUID for user: %s", uuid.c_str()); - if (!ServerInstance->Users->uuidlist.insert(std::make_pair(uuid, this)).second) - throw CoreException("Duplicate UUID "+std::string(uuid)+" in User constructor"); + // Do not insert FakeUsers into the uuidlist so FindUUID() won't return them which is the desired behavior + if (type != USERTYPE_SERVER) + { + if (!ServerInstance->Users.uuidlist.insert(std::make_pair(uuid, this)).second) + throw CoreException("Duplicate UUID in User constructor: " + uuid); + } } LocalUser::LocalUser(int myfd, irc::sockets::sockaddrs* client, irc::sockets::sockaddrs* servaddr) @@ -314,8 +316,7 @@ CullResult FakeUser::cull() { // Fake users don't quit, they just get culled. quitting = true; - // Fake users are not inserted into UserManager::clientlist, they're only in the uuidlist - // and they are removed from there by the linking mod when the server splits + // Fake users are not inserted into UserManager::clientlist or uuidlist, so we don't need to modify those here return User::cull(); }