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++)
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;
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;