X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fusers.cpp;h=18a356ef8113f325d9de2dda03e958df2f6f1359;hb=86f8294c2de86b8d060abbb02f7c51c0ca0d9ead;hp=dbc3ea444a97b162d221bfbcb4f09717b12b6ea7;hpb=92da062c028f4a6546a938631e7574e324040274;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/users.cpp b/src/users.cpp index dbc3ea444..18a356ef8 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -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; } @@ -545,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(); @@ -840,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)