- if(!(p = strchr(++p, ':')))
- return;
- *p = 0;
- txt = ++p;
- if(!strncmp("PRIVMSG", cmd, 8) && chan && txt) {
- snprintf(bufout, sizeof bufout, "<%s> %s", usr, txt);
- pout(chan, bufout);
- }
- else if(!strncmp("PING", cmd, 5) && txt) {
- snprintf(bufout, sizeof bufout, "PONG %s\r\n", txt);
- write(srv, bufout, strlen(bufout));
- }
- return;
+ snprintf(bufout, sizeof bufout, "<%s> %s", usr, txt);
+ pout(chan, bufout);
+ }
+ else if(!strncmp("PING", cmd, 4) && txt) {
+ snprintf(bufout, sizeof bufout, "PONG %s\r\n", txt);
+ write(srv, bufout, strlen(bufout));
+ }
+ else {
+ snprintf(bufout, sizeof bufout, "-!- %s", cmd);
+ pout(usr, bufout);