]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
m_permchannels Save channel TS, topic set time and set by information
[user/henk/code/inspircd.git] / src / users.cpp
index adfa7642cffc7278cfb0aa4fd8592db9422a4324..18a356ef8113f325d9de2dda03e958df2f6f1359 100644 (file)
@@ -88,12 +88,12 @@ std::string User::ProcessNoticeMasks(const char *sm)
                                                this->SetNoticeMask(*c, adding);
 
                                                output += *c;
+                                               oldadding = adding;
                                        }
                                }
                                else
                                        this->WriteNumeric(ERR_UNKNOWNSNOMASK, "%s %c :is unknown snomask char to me", this->nick.c_str(), *c);
 
-                               oldadding = adding;
                        break;
                }
 
@@ -455,6 +455,7 @@ void UserIOHandler::OnDataReady()
                ServerInstance->Users->QuitUser(user, "RecvQ exceeded");
                ServerInstance->SNO->WriteToSnoMask('a', "User %s RecvQ of %lu exceeds connect class maximum of %lu",
                        user->nick.c_str(), (unsigned long)recvq.length(), user->MyClass->GetRecvqMax());
+               return;
        }
        unsigned long sendqmax = ULONG_MAX;
        if (!user->HasPrivPermission("users/flood/increased-buffers"))
@@ -544,7 +545,12 @@ CullResult LocalUser::cull()
        // overwritten in UserManager::AddUser() with the real iterator so this check
        // is only a precaution currently.
        if (localuseriter != ServerInstance->Users->local_users.end())
+       {
+               ServerInstance->Users->local_count--;
                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();
@@ -839,6 +845,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)