X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fusers.cpp;h=3f82b850c9c270e67fcc6fffe4137a292f41617f;hb=cec9265bdbb63c06d73cb983b3fc293905ed79d2;hp=039fdce572e85314659f8b9e30fafcf897e85323;hpb=173bc63cb59bbf19e73d1b823e3e9423c9f79860;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/users.cpp b/src/users.cpp index 039fdce57..3f82b850c 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -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;