From 73e45d7537fb2f608a8899d5075a5cb5dea44bba Mon Sep 17 00:00:00 2001 From: codemastr Date: Mon, 4 Sep 2000 19:39:19 +0000 Subject: [PATCH] fixed some +K bugs --- Changes | 2 ++ src/channel.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/Changes b/Changes index 15305faec..6158b1f0b 100644 --- a/Changes +++ b/Changes @@ -612,3 +612,5 @@ - Fixed a wierd NOTICE bug - Modified and fixed the NOTICE bug totally, with some waste of the nospoof system +- Fixed a bug where +K could be set when +i was not (reported by rapta) +- Made it so if you set -i on a channel that is +K it sets -iK diff --git a/src/channel.c b/src/channel.c index 229b80c2f..68fa5504e 100644 --- a/src/channel.c +++ b/src/channel.c @@ -1598,11 +1598,15 @@ int do_mode_char(chptr, modetype, modechar, param, what, cptr, pcount, pvar, case MODE_TOPICLIMIT: case MODE_NOPRIVMSGS: case MODE_INVITEONLY: + if (what == MODE_DEL && modetype == MODE_INVITEONLY && (chptr->mode.mode & MODE_NOKNOCK)) + chptr->mode.mode &= ~MODE_NOKNOCK; case MODE_RGSTRONLY: case MODE_NOCOLOR: case MODE_NOKICKS: case MODE_STRIP: case MODE_NOKNOCK: + if (what == MODE_ADD && modetype == MODE_NOKNOCK && !(chptr->mode.mode & MODE_INVITEONLY)) + break; #ifdef STRIPBADWORDS case MODE_STRIPBADWORDS: #endif