rendered paste bodystatic void ParsePrint(sv_t *tv, netmsg_t *m, int to, unsigned int mask){ char text[1024]; char buffer[1024]; int level; level = ReadByte(m); ReadString(m, text, sizeof(text)-2); if (level == 3) { char buf[512]; int i, j; // Strip color codes for older clients: FuhQuake, mqwcl if (strcmp(Info_ValueForKey(tv->players[tv->thisplayer].userinfo, "*FuhQuake", buf, sizeof(buf)), "") || strncmp(Info_ValueForKey(tv->players[tv->thisplayer].userinfo, "*client", buf, sizeof(buf)), "mqwcl", 5)) { for (i = 0; i < sizeof(text); i++) { if (i < sizeof(text) - 5 && text[i] == '&' && text[i+1] == 'c') { if (isextendedcode(text[i+2]) && isextendedcode(text[i+3]) && isextendedcode(text[i+4])) { for (j = i; j < sizeof(text); j++) { text[j] = text[j+5]; if (text[j+5] == '\0') break; } } } if (text[i] == '\0') break; } } strcpy(buffer+2, text); buffer[1] = 1; } else { strcpy(buffer+1, text); } buffer[0] = svc_print; if ((to&dem_mask) == dem_all || to == dem_read) { if (level > 1) { QTV_Printf(tv, "%s", text); } } Multicast(tv, (char*)m->data+m->startpos, m->readpos - m->startpos, to, mask, QW|CONNECTING);// Multicast(tv, buffer, strlen(buffer), to, mask, NQ);}