- FOREACH_MOD(I_OnUserKick,OnUserKick(src, user, this, reason, silent));
-
- UCListIter i = user->chans.find(this);
- if (i != user->chans.end())
- {
- /* zap it from the channel list of the user */
- if (!silent)
- this->WriteChannel(src, "KICK %s %s :%s", this->name.c_str(), user->nick.c_str(), reason);
-
- user->chans.erase(i);
- this->RemoveAllPrefixes(user);
- }
-
- if (!this->DelUser(user))
- /* if there are no users left on the channel */
- {
- chan_hash::iterator iter = ServerInstance->chanlist->find(this->name.c_str());
+ CUList except_list;
+ FOREACH_MOD(OnUserKick, (src, memb, reason, except_list));