diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-05-15 13:34:53 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-05-15 13:34:53 +0000 |
commit | 574718589f602ab4e1e59cda6eb89eb2366c8a65 (patch) | |
tree | be6d30db3321967f90492398c50d464f2bfc9d43 /src/modules | |
parent | a1ecc3014a2a218751505a1ea9b34bf7aa47f9a5 (diff) |
Modified so opers can still change nicks on a +N channel
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@815 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_nonicks.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/modules/m_nonicks.cpp b/src/modules/m_nonicks.cpp index 6328e5ee2..579441c89 100644 --- a/src/modules/m_nonicks.cpp +++ b/src/modules/m_nonicks.cpp @@ -37,12 +37,15 @@ class ModuleNoNickChange : public Module if (user->chans[i].channel != NULL) { chanrec* curr = user->chans[i].channel; - if ((curr->IsCustomModeSet('N')) && (user->chans[i].uc_modes < STATUS_HOP)) + if (curr->IsCustomModeSet('N')) { - // don't allow the nickchange, theyre on at least one channel with +N set - // and theyre not a (H)OP on the channel - WriteServ(user->fd,"447 %s :Can't change nickname while on %s (+N is set)",user->nick,curr->name); - return 1; + if (!strchr(user->modes,'o')) + { + // don't allow the nickchange, theyre on at least one channel with +N set + // and theyre not an oper + WriteServ(user->fd,"447 %s :Can't change nickname while on %s (+N is set)",user->nick,curr->name); + return 1; + } } } } |