]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
Remove /summon and /users (I think 15+ years of being marked deprecated is enough...
[user/henk/code/inspircd.git] / src / users.cpp
index 5617715fdeb6b9a6b3f2524095d416fba8981f74..4f5c567d253f222e49fb5dd49902eed6fa00c45f 100644 (file)
@@ -830,16 +830,9 @@ void userrec::UnOper()
                        // unset their oper type (what IS_OPER checks), and remove +o
                        *this->oper = 0;
                        this->modes[UM_OPERATOR] = 0;
-
-                       // remove them from the opers list.
-                       for (std::vector<userrec*>::iterator a = ServerInstance->all_opers.begin(); a < ServerInstance->all_opers.end(); a++)
-                       {
-                               if (*a == this)
-                               {
-                                       ServerInstance->all_opers.erase(a);
-                                       return;
-                               }
-                       }
+                       
+                       // remove the user from the oper list. Will remove multiple entries as a safeguard against bug #404
+                       ServerInstance->all_opers.remove(this);
                }
        }
 
@@ -878,7 +871,7 @@ void userrec::AddClient(InspIRCd* Instance, int socket, int port, bool iscached,
        {
                New = new userrec(Instance);
        }
-       catch (CoreException &e)
+       catch (...)
        {
                Instance->Log(DEFAULT,"*** WTF *** Duplicated UUID! -- Crack smoking monkies have been unleashed.");
                Instance->WriteOpers("*** WARNING *** Duplicate UUID allocated!");