From 1442193c79016ea60a8a6e7df66f758040b77c76 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Fri, 20 Jun 2014 16:20:19 +0200 Subject: Change the type of the user parameter in the OnUserPreNick() hook from User to LocalUser No remote users were passed to this hook before. Remove needless IS_LOCAL() checks. --- src/users.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/users.cpp') 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; } -- cgit v1.3.1-10-gc9f91