I'm not sure if I've submitted this before. diff --git a/sic.c b/sic.c index ecefaf2..bceb823 100644 --- a/sic.c +++ b/sic.c @@ -108,6 +108,7 @@ parsein(char *s) {
static void parsesrv(char *cmd) { + char *ptr; char *usr, *par, *txt; usr = host; @@ -122,7 +123,13 @@ parsesrv(char *cmd) { } skip(cmd, '\r'); par = skip(cmd, ' '); - txt = skip(par, ':'); + ptr = par; + if ((ptr = strstr(par, " :")) == NULL) { + txt = skip(par, ' '); + } else { + *ptr = '\0'; + txt = ptr+2; + } trim(par); if(!strcmp("PONG", cmd)) return;