X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fusers.cpp;h=82f2545f4df730b043c92d722eeeaccaa0314566;hb=0ff2d05ba6b94c5346e6e3e528118fadae1cb126;hp=69483ac9251d025458077cb8e5f8916ea03a9a42;hpb=7cf9bfbcec453ea244e7f66ca5a76af99a73b7cb;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/users.cpp b/src/users.cpp index 69483ac92..82f2545f4 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -78,6 +78,9 @@ User::User(const std::string& uid, Server* srv, UserType type) ServerInstance->Logs->Log("USERS", LOG_DEBUG, "New UUID for user: %s", uuid.c_str()); + if (srv->IsULine()) + ServerInstance->Users->uline_count++; + // Do not insert FakeUsers into the uuidlist so FindUUID() won't return them which is the desired behavior if (type != USERTYPE_SERVER) { @@ -339,6 +342,9 @@ CullResult User::cull() if (client_sa.family() != AF_UNSPEC) ServerInstance->Users->RemoveCloneCounts(this); + if (server->IsULine() && ServerInstance->Users->uline_count) + ServerInstance->Users->uline_count--; + return Extensible::cull(); } @@ -758,17 +764,16 @@ void LocalUser::SetClientIP(const irc::sockets::sockaddrs& sa) return; ServerInstance->Users->RemoveCloneCounts(this); - User::SetClientIP(sa); - - FOREACH_MOD(OnSetUserIP, (this)); - ServerInstance->Users->AddClone(this); // Recheck the connect class. this->MyClass = NULL; this->SetClass(); this->CheckClass(); + + if (!quitting) + FOREACH_MOD(OnSetUserIP, (this)); } void LocalUser::Write(const ClientProtocol::SerializedMessage& text) @@ -854,7 +859,7 @@ void User::WriteNumeric(const Numeric::Numeric& numeric) void User::WriteRemoteNotice(const std::string& text) { - ServerInstance->PI->SendUserNotice(this, text); + ServerInstance->PI->SendMessage(this, text, MSG_NOTICE); } void LocalUser::WriteRemoteNotice(const std::string& text) @@ -1198,10 +1203,24 @@ const std::string& FakeUser::GetFullRealHost() } ConnectClass::ConnectClass(ConfigTag* tag, char t, const std::string& mask) - : config(tag), type(t), fakelag(true), name("unnamed"), registration_timeout(0), host(mask), - pingtime(0), softsendqmax(0), hardsendqmax(0), recvqmax(0), - penaltythreshold(0), commandrate(0), maxlocal(0), maxglobal(0), maxconnwarn(true), maxchans(ServerInstance->Config->MaxChans), - limit(0), resolvehostnames(true) + : config(tag) + , type(t) + , fakelag(true) + , name("unnamed") + , registration_timeout(0) + , host(mask) + , pingtime(0) + , softsendqmax(0) + , hardsendqmax(0) + , recvqmax(0) + , penaltythreshold(0) + , commandrate(0) + , maxlocal(0) + , maxglobal(0) + , maxconnwarn(true) + , maxchans(0) + , limit(0) + , resolvehostnames(true) { }