]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
Erase local users from UserManager::local_list in QuitUser()
[user/henk/code/inspircd.git] / src / users.cpp
index 039fdce572e85314659f8b9e30fafcf897e85323..3f82b850c9c270e67fcc6fffe4137a292f41617f 100644 (file)
@@ -330,7 +330,6 @@ CullResult User::cull()
 
 CullResult LocalUser::cull()
 {
-       ServerInstance->Users->local_users.erase(this);
        ClearInvites();
        eh.cull();
        return User::cull();
@@ -891,8 +890,8 @@ void User::WriteCommonRaw(const std::string &line, bool include_self)
        for (IncludeChanList::const_iterator v = include_c.begin(); v != include_c.end(); ++v)
        {
                Channel* c = (*v)->chan;
-               const UserMembList& ulist = c->GetUsers();
-               for (UserMembList::const_iterator i = ulist.begin(); i != ulist.end(); ++i)
+               const Channel::MemberMap& ulist = c->GetUsers();
+               for (Channel::MemberMap::const_iterator i = ulist.begin(); i != ulist.end(); ++i)
                {
                        LocalUser* u = IS_LOCAL(i->first);
                        if (u && u->already_sent != LocalUser::already_sent_id)
@@ -931,8 +930,8 @@ void User::WriteCommonQuit(const std::string &normal_text, const std::string &op
        }
        for (IncludeChanList::const_iterator v = include_c.begin(); v != include_c.end(); ++v)
        {
-               const UserMembList& ulist = (*v)->chan->GetUsers();
-               for (UserMembList::const_iterator i = ulist.begin(); i != ulist.end(); i++)
+               const Channel::MemberMap& ulist = (*v)->chan->GetUsers();
+               for (Channel::MemberMap::const_iterator i = ulist.begin(); i != ulist.end(); i++)
                {
                        LocalUser* u = IS_LOCAL(i->first);
                        if (u && (u->already_sent != uniq_id))
@@ -997,7 +996,7 @@ void User::SendText(const std::string& linePrefix, std::stringstream& textStream
 bool User::SharesChannelWith(User *other)
 {
        /* Outer loop */
-       for (UCListIter i = this->chans.begin(); i != this->chans.end(); i++)
+       for (User::ChanList::iterator i = this->chans.begin(); i != this->chans.end(); ++i)
        {
                /* Eliminate the inner loop (which used to be ~equal in size to the outer loop)
                 * by replacing it with a map::find which *should* be more efficient
@@ -1078,7 +1077,7 @@ void LocalUser::SetClass(const std::string &explicit_name)
 
        if (!explicit_name.empty())
        {
-               for (ClassVector::iterator i = ServerInstance->Config->Classes.begin(); i != ServerInstance->Config->Classes.end(); i++)
+               for (ServerConfig::ClassVector::const_iterator i = ServerInstance->Config->Classes.begin(); i != ServerInstance->Config->Classes.end(); ++i)
                {
                        ConnectClass* c = *i;
 
@@ -1091,7 +1090,7 @@ void LocalUser::SetClass(const std::string &explicit_name)
        }
        else
        {
-               for (ClassVector::iterator i = ServerInstance->Config->Classes.begin(); i != ServerInstance->Config->Classes.end(); i++)
+               for (ServerConfig::ClassVector::const_iterator i = ServerInstance->Config->Classes.begin(); i != ServerInstance->Config->Classes.end(); ++i)
                {
                        ConnectClass* c = *i;
                        ServerInstance->Logs->Log("CONNECTCLASS", LOG_DEBUG, "Checking %s", c->GetName().c_str());
@@ -1170,7 +1169,7 @@ void LocalUser::SetClass(const std::string &explicit_name)
 void User::PurgeEmptyChannels()
 {
        // firstly decrement the count on each channel
-       for (UCListIter i = this->chans.begin(); i != this->chans.end(); )
+       for (User::ChanList::iterator i = this->chans.begin(); i != this->chans.end(); )
        {
                Channel* c = (*i)->chan;
                ++i;