synchronet not implementing original quotes.txt format
It appears the original WWIV 4.21 wrote 2 metadata lines to the top of quotes.txt. Synchronet does not do this. When you use the original wwivedit (and most likely bredit) with quotes.txt support, it ignores the first two lines of quotes.txt.
Reproduce:
- Setup WWIVEdit (http://wiki.synchro.net/howto:editor:wwivedit).
- In SCFG, Set Automatically Quoted Text to None
- in config/default.def, set QUOTER: [2]
- Reply to a message. See that the first 2 lines are ignored.
Evidence
wwiv 5.0 whatsnew.txt
* QBBS Editors should now mostly work as expected, we strip the colors
out of the messages, and the header lines that go into QUOTES.TXT
since only wwiv editors care about that metadata.
wwiv 5.0 brware/bredit/quote.cpp
if (strchr(QuoteFile.GetLine(0)->Text, '#')!=NULL) { // Quote file contains author info
QuoteFile.RemoveLine(0);
QuoteFile.RemoveLine(0);
}
wwiv 5.0 bbs/external_edit_qbbs.cpp
const auto qfn = FilePath(tmpdir, QUOTES_TXT);
if (!File::Exists(qfn)) {
return false;
}
// Copy quotes.txt to MSGTMP if it exists
TextFile in(qfn, "rt");
if (!in) {
return false;
}
File out(FilePath(tmpdir, MSGTMP));
if (!out.Open(File::modeBinary | File::modeReadWrite | File::modeCreateFile |
File::modeTruncate)) {
return false;
}
const auto lines = in.ReadFileIntoVector();
int num_to_skip = 2;
for (const auto& l : lines) {
if (!l.empty()) {
if (l.front() == CD) {
continue;
}
if (num_to_skip-- > 0) {
continue;
}
}
out.Writeln(stripcolors(l));
}
return true;
wwiv 5.0 quotes.txt creation
I don't fully understand it, but its here: https://github.com/wwivbbs/wwiv/blob/main/common/quote.cpp
https://github.com/MarkHofmann11/WWIVEdit or in deuce's file http://doors.bbsdev.net/wedit.tgz)
wwivedit wequote.pas (you can see the src here:
PROCEDURE SkipHeader(VAR t:text);
BEGIN
readln(t);
readln(t);
END;
PROCEDURE QuoteLines(VAR Infile,Outfile:text; RangeLo,RangeHi:integer; prefix:string);
VAR
Line : Integer;
s : string;
BEGIN
rewrite(OutFile);
reset(infile);
SkipHeader(infile);
Line:=1;
WHILE NOT EOF(infile) DO
...
Edited by Kayz