]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
Fixed an issue that could cause empty parameters in module commands to not be sent...
[user/henk/code/inspircd.git] / src / users.cpp
index 35a0e716fe50ecb88639e4078a25a61a65dc9227..5617715fdeb6b9a6b3f2524095d416fba8981f74 100644 (file)
@@ -873,7 +873,18 @@ void userrec::AddClient(InspIRCd* Instance, int socket, int port, bool iscached,
        /* NOTE: Calling this one parameter constructor for userrec automatically
         * allocates a new UUID and places it in the hash_map.
         */
-       userrec* New = new userrec(Instance);
+       userrec* New = NULL;
+       try
+       {
+               New = new userrec(Instance);
+       }
+       catch (CoreException &e)
+       {
+               Instance->Log(DEFAULT,"*** WTF *** Duplicated UUID! -- Crack smoking monkies have been unleashed.");
+               Instance->WriteOpers("*** WARNING *** Duplicate UUID allocated!");
+               return;
+       }
+
        int j = 0;
 
        Instance->unregistered_count++;
@@ -1374,7 +1385,7 @@ void userrec::Write(std::string text)
 
        try
        {
-               /* ServerInstance->Log(DEBUG,"C[%d] <- %s", this->GetFd(), text.c_str());
+               /* ServerInstance->Log(DEBUG,"C[%d] O %s", this->GetFd(), text.c_str());
                 * WARNING: The above debug line is VERY loud, do NOT
                 * enable it till we have a good way of filtering it
                 * out of the logs (e.g. 1.2 would be good).