X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmessage.cpp;h=e078c95c84a2a746d198b644c3c347d842c25343;hb=fcb124f8d6d3f5678e82049fb8e5e23c8cfaec6d;hp=897ceedbcede5ba22c762f6daa83c783ee24c86b;hpb=047cea32f848d605c549ec123c12c1c400dd7ec1;p=fms.git diff --git a/src/message.cpp b/src/message.cpp index 897ceed..e078c95 100644 --- a/src/message.cpp +++ b/src/message.cpp @@ -678,31 +678,34 @@ const bool Message::ParseNNTPMessage(const std::string &nntpmessage) std::string temp=mime.GetFieldValue("References"); // remove any path folding temp=StringFunctions::Replace(temp,"\r\n",""); - temp=StringFunctions::Replace(temp,"\t",""); + temp=StringFunctions::Replace(temp,"\t"," "); std::vector parts; int count=0; StringFunctions::SplitMultiple(temp,", \t",parts); for(std::vector::reverse_iterator i=parts.rbegin(); i!=parts.rend(); i++) { - // get rid of < and > and any whitespace - (*i)=StringFunctions::Replace((*i),"<",""); - (*i)=StringFunctions::Replace((*i),">",""); - (*i)=StringFunctions::TrimWhitespace((*i)); - /* - // erase @ and everything after - if((*i).find("@")!=std::string::npos) + if((*i).size()>2) { - (*i).erase((*i).find("@")); - } - */ - // only erase after @ if message is old type with @freenetproject.org - if((*i).find("@freenetproject.org")!=std::string::npos) - { - (*i).erase((*i).find("@")); - } - if((*i)!="") - { - m_inreplyto[count++]=(*i); + // get rid of < and > and any whitespace + (*i)=StringFunctions::Replace((*i),"<",""); + (*i)=StringFunctions::Replace((*i),">",""); + (*i)=StringFunctions::TrimWhitespace((*i)); + /* + // erase @ and everything after + if((*i).find("@")!=std::string::npos) + { + (*i).erase((*i).find("@")); + } + */ + // only erase after @ if message is old type with @freenetproject.org + if((*i).find("@freenetproject.org")!=std::string::npos) + { + (*i).erase((*i).find("@")); + } + if((*i)!="") + { + m_inreplyto[count++]=(*i); + } } } }