X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fnntp%2Fnntpconnection.cpp;h=078c1c3da4d1e815696d5758214ed757381ad2b9;hb=52c0819bfc1d083c6e0738f75f0d7eeba521295a;hp=d909c364f9ce9c0529e06615860064fe9974f696;hpb=d8ccfe2b3944adf07d35534459cdda19d15217c8;p=fms.git diff --git a/src/nntp/nntpconnection.cpp b/src/nntp/nntpconnection.cpp index d909c36..078c1c3 100644 --- a/src/nntp/nntpconnection.cpp +++ b/src/nntp/nntpconnection.cpp @@ -387,7 +387,6 @@ const bool NNTPConnection::HandleListGroupCommand(const NNTPCommand &command) std::ostringstream tempstr; Board board; bool validgroup=false; - int tempint; int lownum=-1; int highnum=-1; @@ -636,6 +635,13 @@ const bool NNTPConnection::HandleOverCommand(const NNTPCommand &command) messageuuid=command.m_arguments[0]; messageuuid=StringFunctions::Replace(messageuuid,"<",""); messageuuid=StringFunctions::Replace(messageuuid,">",""); + /* + // get rid of @ and everything after + if(messageuuid.find("@")!=std::string::npos) + { + messageuuid.erase(messageuuid.find("@")); + } + */ } // single article or range else @@ -774,7 +780,14 @@ void NNTPConnection::HandlePostedMessage(const std::string &message) if(mess.ParseNNTPMessage(message)) { - mess.StartFreenetInsert(); + if(mess.PostedToAdministrationBoard()==true) + { + mess.HandleAdministrationMessage(); + } + else + { + mess.StartFreenetInsert(); + } SendBufferedLine("240 Article received OK"); } else @@ -944,7 +957,7 @@ void NNTPConnection::SendArticleOverInfo(Message &message) { line+=" "; } - line+="<"+(*i).second+">"; + line+="<"+(*i).second+">"; //+"@freenetproject.org>"; } line+="\t"; } @@ -1004,6 +1017,21 @@ void NNTPConnection::SendArticleParts(const NNTPConnection::NNTPCommand &command else { articleid=command.m_arguments[0]; + //strip off < and > and everthing after @ + if(articleid.size()>0 && articleid[0]=='<') + { + articleid.erase(0,1); + } + if(articleid.size()>0 && articleid[articleid.size()-1]=='>') + { + articleid.erase(articleid.size()-1); + } + /* + if(articleid.size()>0 && articleid.find('@')!=std::string::npos) + { + articleid.erase(articleid.find('@')); + } + */ message.Load(articleid); type=2; }