]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
Remove FakeUser from clientlist/uuidlist, as it bypasses QuitUser
[user/henk/code/inspircd.git] / src / users.cpp
index b9d454c8b16d57375f223ef44c1d4fd1ca833e00..fcb470ed9fe511d9c51170dc4fdc4b41254880b3 100644 (file)
@@ -236,7 +236,7 @@ LocalUser::LocalUser(int myfd, irc::sockets::sockaddrs* client, irc::sockets::so
 User::~User()
 {
        if (ServerInstance->Users->uuidlist->find(uuid) != ServerInstance->Users->uuidlist->end())
-               ServerInstance->Logs->Log("USERS", ERROR, "User destructor for %s called without cull", uuid.c_str());
+               ServerInstance->Logs->Log("USERS", DEFAULT, "User destructor for %s called without cull", uuid.c_str());
 }
 
 const std::string& User::MakeHost()
@@ -575,7 +575,6 @@ CullResult User::cull()
        if (client_sa.sa.sa_family != AF_UNSPEC)
                ServerInstance->Users->RemoveCloneCounts(this);
 
-       ServerInstance->Users->uuidlist->erase(uuid);
        return Extensible::cull();
 }
 
@@ -595,6 +594,8 @@ CullResult FakeUser::cull()
 {
        // Fake users don't quit, they just get culled.
        quitting = true;
+       ServerInstance->Users->clientlist->erase(user->nick);
+       ServerInstance->Users->uuidlist->erase(user->uuid);
        return User::cull();
 }