From becf0c5c1c197e177c3fb98fe0784942ca5759cf Mon Sep 17 00:00:00 2001 From: pk910 Date: Sat, 2 Jul 2011 17:16:47 +0200 Subject: [PATCH] send KICK's only to users seeing the leaving user on MODE_AUDITORIUM channels --- ircd/m_kick.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/ircd/m_kick.c b/ircd/m_kick.c index c6595d4..bccd741 100644 --- a/ircd/m_kick.c +++ b/ircd/m_kick.c @@ -167,9 +167,13 @@ int m_kick(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) sendcmdto_one(who, CMD_JOIN, sptr, "%H", chptr); sendcmdto_one(sptr, CMD_KICK, sptr, "%H %C :%s", chptr, who, comment); CheckDelayedJoins(chptr); + } else if((member->channel->mode.mode & MODE_AUDITORIUM) && !IsVoicedOrOpped(member)) { + /* send the kick to ops only. */ + if (MyUser(who)) + sendcmdto_one(sptr, CMD_KICK, who, "%H %C :%s", chptr, who, comment); + sendcmdto_channel_butserv_butone(sptr, CMD_KICK, chptr, NULL, SKIP_NONOPS, "%H %C :%s", chptr, who, comment); } else - sendcmdto_channel_butserv_butone(sptr, CMD_KICK, chptr, NULL, 0, "%H %C :%s", chptr, who, - comment); + sendcmdto_channel_butserv_butone(sptr, CMD_KICK, chptr, NULL, 0, "%H %C :%s", chptr, who, comment); make_zombie(member, who, cptr, sptr, chptr); @@ -269,6 +273,11 @@ int ms_kick(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) if (MyUser(who)) sendcmdto_one(IsServer(sptr) ? &his : sptr, CMD_KICK, who, "%H %C :%s", chptr, who, comment); + } else if((member->channel->mode.mode & MODE_AUDITORIUM) && !IsVoicedOrOpped(member)) { + /* send the kick to ops only. */ + if (MyUser(who)) + sendcmdto_one(IsServer(sptr) ? &his : sptr, CMD_KICK, who, "%H %C :%s", chptr, who, comment); + sendcmdto_channel_butserv_butone(IsServer(sptr) ? &his : sptr, CMD_KICK, chptr, NULL, SKIP_NONOPS, "%H %C :%s", chptr, who, comment); } else { sendcmdto_channel_butserv_butone(IsServer(sptr) ? &his : sptr, CMD_KICK, chptr, NULL, 0, "%H %C :%s", chptr, who, -- 2.20.1