X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_nickflood.cpp;h=708d30e6beee622155de397b8c964a2f2f6def2b;hb=f5c631ef8641db6455bed23c02e5a39f63f7d6d0;hp=e4f12c7bc4e7a5f9b2b75eebc30453d04b44da13;hpb=f8ccaed31d68661d16eae1a412b337af09de111b;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_nickflood.cpp b/src/modules/m_nickflood.cpp index e4f12c7bc..708d30e6b 100644 --- a/src/modules/m_nickflood.cpp +++ b/src/modules/m_nickflood.cpp @@ -198,7 +198,7 @@ class ModuleNickFlood : public Module ModResult OnUserPreNick(User* user, const std::string &newnick) { - if (isdigit(newnick[0])) /* allow switches to UID */ + if (ServerInstance->NICKForced.get(user)) /* Allow forced nick changes */ return MOD_RES_PASSTHRU; for (UCListIter i = user->chans.begin(); i != user->chans.end(); i++) @@ -209,7 +209,7 @@ class ModuleNickFlood : public Module nickfloodsettings *f = nf.ext.get(channel); if (f) { - FIRST_MOD_RESULT(OnChannelRestrictionApply, res, (user,channel,"nickflood")); + res = ServerInstance->OnCheckExemption(user,channel,"nickflood"); if (res == MOD_RES_ALLOW) continue; @@ -248,7 +248,7 @@ class ModuleNickFlood : public Module nickfloodsettings *f = nf.ext.get(channel); if (f) { - FIRST_MOD_RESULT(OnChannelRestrictionApply, res, (user,channel,"nickflood")); + res = ServerInstance->OnCheckExemption(user,channel,"nickflood"); if (res == MOD_RES_ALLOW) return;