diff options
author | attilamolnar <attilamolnar@hush.com> | 2013-08-12 20:10:06 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-08-12 20:10:06 +0200 |
commit | 37394a80c2b4a3948e4f0e850710c9518d9ba259 (patch) | |
tree | 9a15cf8cc9201f29ced2e510abc94e73c86db91a /src/users.cpp | |
parent | 558eea33dc323518dba505a99ffbb19b8fbe1267 (diff) |
Clean up a few constructors
Do not silently correct a zero TS in Channel::Channel(); require callers to supply a valid TS instead
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/users.cpp b/src/users.cpp index 21079f0cc..0383aaaa4 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -80,10 +80,7 @@ User::User(const std::string &uid, const std::string& sid, int type) ServerInstance->Logs->Log("USERS", LOG_DEBUG, "New UUID for user: %s", uuid.c_str()); - user_hash::iterator finduuid = ServerInstance->Users->uuidlist->find(uuid); - if (finduuid == ServerInstance->Users->uuidlist->end()) - (*ServerInstance->Users->uuidlist)[uuid] = this; - else + if (!ServerInstance->Users->uuidlist->insert(std::make_pair(uuid, this)).second) throw CoreException("Duplicate UUID "+std::string(uuid)+" in User constructor"); } |