From aa9a8067b11a8c71e4c0251bb2e325f3b9b14d95 Mon Sep 17 00:00:00 2001 From: "B.Greenham" Date: Sat, 20 Mar 2010 12:49:57 -0400 Subject: [PATCH] Use strip_unprintable for chmodes +K and +G, which makes evasion less trivial. --- modules/core/m_message.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/core/m_message.c b/modules/core/m_message.c index acbae11..29c4b44 100644 --- a/modules/core/m_message.c +++ b/modules/core/m_message.c @@ -501,7 +501,7 @@ msg_channel(int p_or_n, const char *command, if(chptr->mode.mode & MODE_NOREPEAT) { rb_strlcpy(text2, text, BUFSIZE); - strip_colour(text2); + strip_unprintable(text2); md = channel_metadata_find(chptr, "NOREPEAT"); if(md && (!ConfigChannel.exempt_cmode_K || !is_any_op(msptr))) { @@ -539,9 +539,11 @@ msg_channel(int p_or_n, const char *command, { if (strlen(text) > 10 && chptr->mode.mode & MODE_NOCAPS && (!ConfigChannel.exempt_cmode_G || !is_any_op(msptr))) { - for(contor=0; contor < strlen(text); contor++) + rb_strlcpy(text2, text, BUFSIZE); + strip_unprintable(text2); + for(contor=0; contor < strlen(text2); contor++) { - if(IsUpper(text[contor]) && !isdigit(text[contor])) + if(IsUpper(text2[contor]) && !isdigit(text2[contor])) caps++; len++; }