summaryrefslogtreecommitdiff
path: root/src/modules/m_nonicks.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_nonicks.cpp')
-rw-r--r--src/modules/m_nonicks.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/modules/m_nonicks.cpp b/src/modules/m_nonicks.cpp
index f29cbf04a..9a1d0079e 100644
--- a/src/modules/m_nonicks.cpp
+++ b/src/modules/m_nonicks.cpp
@@ -85,16 +85,10 @@ class ModuleNoNickChange : public Module
{
Channel* curr = i->first;
- if (curr->IsModeSet('N'))
- {
- if (CHANOPS_EXEMPT(ServerInstance, 'N') && curr->GetStatus(user) == STATUS_OP)
- continue;
-
- user->WriteNumeric(ERR_CANTCHANGENICK, "%s :Can't change nickname while on %s (+N is set)", user->nick.c_str(), curr->name.c_str());
- return 1;
- }
+ if (CHANOPS_EXEMPT(ServerInstance, 'N') && curr->GetStatus(user) == STATUS_OP)
+ continue;
- if (curr->IsExtBanned(user, 'N'))
+ if (curr->IsModeSet('N') || curr->IsExtBanned(user, 'N'))
{
user->WriteNumeric(ERR_CANTCHANGENICK, "%s :Can't change nickname while on %s (+N is set)", user->nick.c_str(), curr->name.c_str());
return 1;