]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/helperfuncs.cpp
Add options:maxtargets that was somehow omitted, fixes bug #400 (Reported by DarkStorm)
[user/henk/code/inspircd.git] / src / helperfuncs.cpp
index 223099c4539ac4c2ac2c08ae0796c0394af59094..4338fb9daffae390624c4469cc93a1914bd6e5ab 100644 (file)
@@ -268,17 +268,12 @@ userrec *InspIRCd::FindUUID(const std::string &uid)
 
 userrec *InspIRCd::FindUUID(const char *uid)
 {
-       for (user_hash::const_iterator a = this->clientlist->begin(); a != this->clientlist->end(); a++)
-       {
-               userrec *u = a->second;
+       user_hash::iterator finduuid = uuidlist->find(uid);
 
-               if (strcmp(u->uuid, uid) == 0)
-               {
-                       return u;
-               }
-       }
+       if (finduuid == uuidlist->end())
+               return NULL;
 
-       return NULL;
+       return finduuid->second;
 }
 
 /* find a channel record by channel name and return a pointer to it */