aboutsummaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2020-11-01 00:32:38 +0000
committerGravatar Sadie Powell2020-11-01 00:32:38 +0000
commite7837aa2ca339bc0e9d27496a02c5520bdecd674 (patch)
tree6ba33424870c9a8dba25feb10ef23ae59de74f0f /src/users.cpp
parentUse auto for config code in more places. (diff)
parentRelease v3.8.0. (diff)
Merge branch 'insp3' into master.
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/users.cpp b/src/users.cpp
index b57e51644..c6e5575ec 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -1067,7 +1067,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();
}