Use strip_unprintable for chmodes +K and +G, which makes evasion less trivial.

This commit is contained in:
B.Greenham 2010-03-20 12:49:57 -04:00
parent 114406d021
commit aa9a8067b1
1 changed files with 5 additions and 3 deletions

View File

@ -501,7 +501,7 @@ msg_channel(int p_or_n, const char *command,
if(chptr->mode.mode & MODE_NOREPEAT) if(chptr->mode.mode & MODE_NOREPEAT)
{ {
rb_strlcpy(text2, text, BUFSIZE); rb_strlcpy(text2, text, BUFSIZE);
strip_colour(text2); strip_unprintable(text2);
md = channel_metadata_find(chptr, "NOREPEAT"); md = channel_metadata_find(chptr, "NOREPEAT");
if(md && (!ConfigChannel.exempt_cmode_K || !is_any_op(msptr))) 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))) 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++; caps++;
len++; len++;
} }