]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
Log some internal errors on DEFAULT loglevel instead of DEBUG, log detected errors...
[user/henk/code/inspircd.git] / src / users.cpp
index dbc3ea444a97b162d221bfbcb4f09717b12b6ea7..f48e3642fb463e01416db85e20745513693c30f0 100644 (file)
@@ -546,6 +546,8 @@ CullResult LocalUser::cull()
        // is only a precaution currently.
        if (localuseriter != ServerInstance->Users->local_users.end())
                ServerInstance->Users->local_users.erase(localuseriter);
+       else
+               ServerInstance->Logs->Log("USERS", DEFAULT, "ERROR: LocalUserIter does not point to a valid entry for " + this->nick);
 
        ClearInvites();
        eh.cull();
@@ -840,6 +842,12 @@ void User::InvalidateCache()
 
 bool User::ChangeNick(const std::string& newnick, bool force)
 {
+       if (quitting)
+       {
+               ServerInstance->Logs->Log("USERS", DEFAULT, "ERROR: Attempted to change nick of a quitting user: " + this->nick);
+               return false;
+       }
+
        ModResult MOD_RESULT;
 
        if (force)