Index: kvi_sp_ctcp.cpp =================================================================== RCS file: /cvs/kvirccvs/kvirc/src/kvirc/sparser/kvi_sp_ctcp.cpp,v retrieving revision 1.45 diff -U4 -r1.45 kvi_sp_ctcp.cpp --- kvirc/src/kvirc/sparser/kvi_sp_ctcp.cpp 25 Mar 2005 02:50:01 -0000 1.45 +++ kvirc/src/kvirc/sparser/kvi_sp_ctcp.cpp 6 Apr 2005 20:58:10 -0000 @@ -526,41 +526,19 @@ // extracted parameter is the last in a positional parameter // based CTCP message. // - int bInString = 0; while(*msg_ptr == ' ')msg_ptr++; // skip leading spaces - if(*msg_ptr == '"') - { - // a quoted parameter - bInString = 1; - msg_ptr++; - } - const char * begin = msg_ptr; while(*msg_ptr) { switch(*msg_ptr) { - case '\\': - // backslash : escape sequence - if(msg_ptr != begin)buffer.append(begin,msg_ptr - begin); - msg_ptr++; - if(*msg_ptr) - { - // decode the escape - msg_ptr = decodeCtcpEscape(msg_ptr,buffer); - begin = msg_ptr; - } - // else it is a senseless trailing backslash. - // Just ignore and let the function - // return spontaneously. - break; case ' ': // space : separate tokens if not in string - if(bInString || (!bSpaceBreaks))msg_ptr++; + if(!bSpaceBreaks)msg_ptr++; else { // Not in string and space breaks: end of token // skip trailing white space (this could be avoided) // and return @@ -568,27 +546,8 @@ while(*msg_ptr == ' ')msg_ptr++; return msg_ptr; } break; - case '"': - if(bInString) - { - // A string terminator. We don't return - // immediately since if !bSpaceBreaks - // we must handle tokens until the end - // and otherwise we just run up to the - // next breaking space (but that's a bug anyway, heh). - if(msg_ptr != begin)buffer.append(begin,msg_ptr - begin); - bInString = 0; - msg_ptr++; - begin = msg_ptr; - } else { - // we don't begin a string here - // since we're in the middle of the token - // it is assumed to be simply a non encoded " - msg_ptr++; - } - break; default: // any other char msg_ptr++; break;