diff options
| author | 2013-05-16 16:00:19 +0200 | |
|---|---|---|
| committer | 2013-05-18 21:23:52 +0200 | |
| commit | f3d134a5b642b83e865c03b45c313df7f829ba15 (patch) | |
| tree | d7a2e9b138b3d9d784f067b3db4eade52281dbae /src/users.cpp | |
| parent | Remove unused UserManager::ServerPrivmsgAll() (diff) | |
Get rid of the NICKForced extension
Don't run OnUserPreNick when the nick change is forced
Diffstat (limited to 'src/users.cpp')
| -rw-r--r-- | src/users.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/users.cpp b/src/users.cpp index 460f97a18..f7dafeb86 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -795,17 +795,16 @@ bool User::ChangeNick(const std::string& newnick, bool force) return false; } - ModResult MOD_RESULT; - - if (force) - ServerInstance->NICKForced.set(this, 1); - FIRST_MOD_RESULT(OnUserPreNick, MOD_RESULT, (this, newnick)); - ServerInstance->NICKForced.set(this, 0); - - if (MOD_RESULT == MOD_RES_DENY) + if (!force) { - ServerInstance->stats->statsCollisions++; - return false; + ModResult MOD_RESULT; + FIRST_MOD_RESULT(OnUserPreNick, MOD_RESULT, (this, newnick)); + + if (MOD_RESULT == MOD_RES_DENY) + { + ServerInstance->stats->statsCollisions++; + return false; + } } if (assign(newnick) == assign(nick)) |
