diff options
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/users.cpp b/src/users.cpp index 1290b92be..8b34cfe8d 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -619,11 +619,13 @@ bool User::ChangeNick(const std::string& newnick, bool force, time_t newts) return false; } - if (!force) + LocalUser* const localuser = IS_LOCAL(this); + if (!force && localuser) { ModResult MOD_RESULT; - FIRST_MOD_RESULT(OnUserPreNick, MOD_RESULT, (this, newnick)); + FIRST_MOD_RESULT(OnUserPreNick, MOD_RESULT, (localuser, newnick)); + // If a module denied the change, abort now if (MOD_RESULT == MOD_RES_DENY) return false; } |