+
+ /*
+ * XXX: HACK: We do the increment on the *POST* event here (instead of all together) because we have no way of knowing whether other modules would block a nickchange.
+ */
+ virtual void OnUserPostNick(User* user, const std::string &oldnick)
+ {
+ if (isdigit(user->nick[0])) /* allow switches to UID */
+ return;
+
+ for (UCListIter i = user->chans.begin(); i != user->chans.end(); ++i)
+ {
+ Channel *channel = i->first;
+
+ nickfloodsettings *f;
+ if (channel->GetExt("nickflood", f))
+ {
+ if (CHANOPS_EXEMPT(ServerInstance, 'F') && channel->GetStatus(user) == STATUS_OP)
+ return;
+
+ /* moved this here to avoid incrementing the counter for nick
+ * changes that are denied for some other reason (bans, +N, etc.)
+ * per bug #874.
+ */
+ f->addnick();
+ }
+ }
+ return;
+ }
+