X-Git-Url: https://git.pterodactylus.net/?p=fms.git;a=blobdiff_plain;f=src%2Fmessage.cpp;h=e078c95c84a2a746d198b644c3c347d842c25343;hp=897ceedbcede5ba22c762f6daa83c783ee24c86b;hb=b88f50bfec6dbcd169bb8285e7c42b93baf52b6b;hpb=07319f767b4c4f0e06e9957f217d5107b196617b 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); + } } } }