X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fusers.cpp;h=6c58f0617d500c52624336a4e427a2aa2cd7c6fe;hb=9ad873886e518bf3621a88e8c48607ab79020c0a;hp=01bad8b619bce48edbfc179b25eaf208fcafa199;hpb=d0f802e30c492cb1b7e55f51063bfd38b29931c6;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/users.cpp b/src/users.cpp index 01bad8b61..6c58f0617 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -112,8 +112,8 @@ LocalUser::LocalUser(int myfd, irc::sockets::sockaddrs* client, irc::sockets::so ChangeRealHost(GetIPString(), true); } -LocalUser::LocalUser(int myfd, const std::string& uuid, Serializable::Data& data) - : User(uuid, ServerInstance->FakeClient->server, USERTYPE_LOCAL) +LocalUser::LocalUser(int myfd, const std::string& uid, Serializable::Data& data) + : User(uid, ServerInstance->FakeClient->server, USERTYPE_LOCAL) , eh(this) , already_sent(0) { @@ -758,17 +758,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 +853,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 +1197,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) { }