diff options
| author | 2020-10-29 12:50:55 +0000 | |
|---|---|---|
| committer | 2020-10-29 12:50:55 +0000 | |
| commit | f0d76147e68e96bfb51226f84f644fefdd2ab565 (patch) | |
| tree | a4d57544b9fda84468280d20042b6780809d1194 /src/users.cpp | |
| parent | Don't kill cloaking users when hash/md5 is missing. (diff) | |
Don't call the OnChangeRealHost event when initialising a user.
Fixes a (git only) crash when a user gets xlined before they have
been initialised.
Diffstat (limited to 'src/users.cpp')
| -rw-r--r-- | src/users.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/users.cpp b/src/users.cpp index a99b51c2c..7a11f22c8 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -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(); } |
