diff options
Diffstat (limited to 'src/modules/m_nonicks.cpp')
-rw-r--r-- | src/modules/m_nonicks.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/modules/m_nonicks.cpp b/src/modules/m_nonicks.cpp index 15ee4e7f8..d4da3e951 100644 --- a/src/modules/m_nonicks.cpp +++ b/src/modules/m_nonicks.cpp @@ -46,12 +46,9 @@ class ModuleNoNickChange : public Module tokens["EXTBAN"].push_back('N'); } - ModResult OnUserPreNick(User* user, const std::string &newnick) CXX11_OVERRIDE + ModResult OnUserPreNick(LocalUser* user, const std::string& newnick) CXX11_OVERRIDE { - if (!IS_LOCAL(user)) - return MOD_RES_PASSTHRU; - - for (UCListIter i = user->chans.begin(); i != user->chans.end(); i++) + for (User::ChanList::iterator i = user->chans.begin(); i != user->chans.end(); i++) { Channel* curr = (*i)->chan; @@ -65,8 +62,8 @@ class ModuleNoNickChange : public Module if (!curr->GetExtBanStatus(user, 'N').check(!curr->IsModeSet(nn))) { - user->WriteNumeric(ERR_CANTCHANGENICK, ":Can't change nickname while on %s (+N is set)", - curr->name.c_str()); + user->WriteNumeric(ERR_CANTCHANGENICK, InspIRCd::Format("Can't change nickname while on %s (+N is set)", + curr->name.c_str())); return MOD_RES_DENY; } } |