summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 476a4f1cd..72cf2103d 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -347,6 +347,12 @@ userrec::userrec(InspIRCd* Instance, const std::string &uid) : ServerInstance(In
operquit = cached_fullhost = cached_hostip = cached_makehost = cached_fullrealhost = NULL;
if (!uid.empty())
strlcpy(uuid, uid.c_str(), UUID_LENGTH);
+
+ user_hash::iterator finduuid = Instance->uuidlist->find(uuid);
+ if (finduuid != Instance->uuidlist->end())
+ (*Instance->uuidlist)[uuid] = this;
+ else
+ throw CoreException("Duplicate UUID "+uid+" in userrec constructor");
}
void userrec::RemoveCloneCounts()
@@ -393,6 +399,8 @@ userrec::~userrec()
}
#endif
}
+
+ ServerInstance->uuidlist->erase(uuid);
}
char* userrec::MakeHost()