Commits

Anonymous committed b988fd4

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

Comments (0)

Files changed (1)

modules/core/m_message.c

 	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)))
 		{
 		{
 			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++;
 				}