From 8e3b2b85c7221f2f9f1ca6d5e48880d521d2a1a3 Mon Sep 17 00:00:00 2001 From: "B.Greenham" Date: Fri, 5 Mar 2010 19:10:24 -0500 Subject: [PATCH] Clean up cmode norepeat's metadata when unsetting +K. --- src/chmode.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/chmode.c b/src/chmode.c index 88f9d51..64a0857 100644 --- a/src/chmode.c +++ b/src/chmode.c @@ -543,7 +543,7 @@ chm_simple(struct Client *source_p, struct Channel *chptr, } else if((dir == MODE_DEL) && (chptr->mode.mode & mode_type)) { - /* cleanup KICKNOREJOIN metadata on -J */ + /* cleanup metadata when the related mode is removed */ if(c == 'J') { DICTIONARY_FOREACH(md, &iter, chptr->metadata) @@ -552,6 +552,8 @@ chm_simple(struct Client *source_p, struct Channel *chptr, channel_metadata_delete(chptr, md->name, 0); } } + if(c == 'K') + channel_metadata_delete(chptr, md->name, 0); chptr->mode.mode &= ~mode_type;