]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
Don't call the OnChangeRealHost event when initialising a user.
[user/henk/code/inspircd.git] / src / users.cpp
index a99b51c2ce714cd069f30527d39b089063774f3c..7a11f22c8900e60a37e9a5c57c0d177ad9527e9c 100644 (file)
@@ -1075,7 +1075,10 @@ void User::ChangeRealHost(const std::string& host, bool resetdisplay)
        if (!changehost)
                return;
 
-       FOREACH_MOD(OnChangeRealHost, (this, host));
+       // Don't call the OnChangeRealHost event when initialising a user.
+       if (!realhost.empty())
+               FOREACH_MOD(OnChangeRealHost, (this, host));
+
        realhost = host;
        this->InvalidateCache();
 }