From 90ee2ee38c733520a8d149f90498bdbdb6091d67 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 27 Aug 2007 13:54:15 +0000 Subject: Add FindNickOnly, that wont fall through to uid checks if isdigit(*first). We may need this. (i thought we did for this fix, we dont) Fix cmd_nick to not treat all nicks as invalid and make the client give up. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7883 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/users.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index de745d325..cdcc245d4 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -351,8 +351,10 @@ userrec::userrec(InspIRCd* Instance, const std::string &uid) : ServerInstance(In else strlcpy(uuid, uid.c_str(), UUID_LENGTH); + ServerInstance->Log(DEBUG,"New UUID for user: %s (%s)", uuid, uid.empty() ? "allocated new" : "used remote"); + user_hash::iterator finduuid = Instance->uuidlist->find(uuid); - if (finduuid != Instance->uuidlist->end()) + if (finduuid == Instance->uuidlist->end()) (*Instance->uuidlist)[uuid] = this; else throw CoreException("Duplicate UUID "+std::string(uuid)+" in userrec constructor"); -- cgit v1.2.3