*** old/channel.c Thu Feb 15 03:45:14 1996 --- channel.c Thu Apr 11 21:10:40 1996 *************** *** 809,818 **** break; *parv = check_string(*parv); { ! u_char *s; ! for (s = (u_char *)*parv; *s; s++) *s &= 0x7f; } if (MyClient(sptr) && opcnt >= MAXMODEPARAMS) break; --- 809,831 ---- break; *parv = check_string(*parv); { ! u_char *s, *t; ! int abuse = 0; ! for (s = t = (u_char *)*parv; *s; s++) ! { ! if (*s > 0x7f && *s <= 0xa0) ! abuse++; *s &= 0x7f; + if (*s > (u_char)' ' && *s != ':') + *t++ = *s; + } + *t = '\0'; + if (abuse) + sendto_ops("User %s trying to abuse +k bug", + sptr->name); + if (t == (u_char *)*parv) + break; } if (MyClient(sptr) && opcnt >= MAXMODEPARAMS) break;