]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
Be consistent with Robby's qQ snomask changes
[user/henk/code/inspircd.git] / src / users.cpp
index b05d24871aa5b425a27841f337baf03fa45250d6..39be8127227195af848f68d261db67adb27c1bf8 100644 (file)
@@ -224,7 +224,8 @@ LocalUser::LocalUser(int myfd, irc::sockets::sockaddrs* client, irc::sockets::so
 {
        lastping = 0;
        eh.SetFd(myfd);
-       memcpy(&client_sa, client, sizeof(irc::sockets::sockaddrs));
+
+       SetClientIP(client);
        memcpy(&server_sa, servaddr, sizeof(irc::sockets::sockaddrs));
 }
 
@@ -841,7 +842,7 @@ void LocalUser::FullConnect()
 
        FOREACH_MOD(I_OnPostConnect,OnPostConnect(this));
 
-       ServerInstance->SNO->WriteToSnoMask('c',"Client connecting on port %d (class %s): %s!%s@%s [%s] [%s]",
+       ServerInstance->SNO->WriteToSnoMask('c',"Client connecting on port %d (class %s): %s!%s@%s (%s) [%s]",
                this->GetServerPort(), this->MyClass->name.c_str(), this->nick.c_str(), this->ident.c_str(), this->host.c_str(), this->GetIPString(), this->fullname.c_str());
        ServerInstance->Logs->Log("BANCACHE", DEBUG, "BanCache: Adding NEGATIVE hit for %s", this->GetIPString());
        ServerInstance->BanCache->AddHit(this->GetIPString(), "", "");
@@ -1012,6 +1013,8 @@ bool User::SetClientIP(irc::sockets::sockaddrs *sa)
 {
        memcpy(&client_sa, sa, sizeof(irc::sockets::sockaddrs));
 
+       FOREACH_MOD(I_OnSetClientIP, OnSetClientIP(this));
+
        return true;
 }