@@ -322,9 +322,9 @@ static std::string from_name(const mailrec& m, const Network& net, const slrec&
322322 return a ()->names ()->UserName (m.fromuser );
323323 }
324324 } else {
325- if (nn == 255 ) {
326- return fmt::format (" #{} @{}." , m.fromuser , m.fromsys , net.name );
327- }
325+ // if (nn == 255) {
326+ // return fmt::format("#{} @{}.", m.fromuser, m.fromsys, net.name);
327+ // }
328328 if (auto o = readfile (&m.msg , " email" )) {
329329 if (const auto idx = o.value ().find (' \r ' ); idx != std::string::npos) {
330330 const std::string from = o.value ().substr (0 , idx);
@@ -346,12 +346,12 @@ static std::string from_name(const mailrec& m, const Network& net, const slrec&
346346static std::tuple<Network, int > network_and_num (const mailrec& m) {
347347 Network net{};
348348 auto nn = network_number_from (&m);
349- if (nn <= a ()->nets ().size ()) {
349+ if (nn < a ()->nets ().size ()) {
350350 net = a ()->nets ()[nn];
351351 } else {
352352 net.sysnum = static_cast <uint16_t >(-1 );
353353 net.type = network_type_t ::unknown;
354- net.name = fmt::format (" <deleted network #{}>" , nn);
354+ net.name = fmt::format (" <net #{}>" , nn);
355355 nn = 255 ;
356356 }
357357 return std::make_tuple (net, nn);
@@ -404,7 +404,9 @@ void readmail(bool newmail_only) {
404404 curmail = 0 ;
405405 } else {
406406 bout.outstr (" \r\n\n |#2You have mail from:\r\n " );
407- bout.print (" |#9{}\r\n " , std::string (a ()->user ()->screen_width () - 1 , ' -' ));
407+ std::string box = okansi () ? " \xDA\xC0\xBF\xD9\xC4\xB3 " : " ++++-|" ;
408+ // 0 upperleft 1 lowerleft 2 upperright 3 lowerright 4 = - 5 = |"
409+ bout.print (" |#7\xDA {}\xBF\r\n " , std::string (a ()->user ()->screen_width () - 3 , box[4 ]));
408410 for (auto i = 0 ; i < mw && !abort; i++) {
409411 if (!read_same_email (mloc, mw, i, m, false , 0 )) {
410412 continue ;
@@ -417,11 +419,12 @@ void readmail(bool newmail_only) {
417419 auto [net, nn] = network_and_num (m);
418420 set_net_num (nn);
419421 const auto current_line =
420- fmt::format (" |#2{:>3}{}|#1{:<45.45}|#7| |#1{:<25.25}" , i + 1 , (m.status & status_seen ? " " : " |#3*" ),
421- from_name (m, net, sl, nn), stripcolors (m.title ));
422+ fmt::format (" |#7{}|# 2{:>3}{}|#1{:<45.45}|#7{} |#1{:<25.25} |#7{} " , box[ 5 ] , i + 1 , (m.status & status_seen ? " " : " |#3*" ),
423+ from_name (m, net, sl, nn), box[ 5 ], stripcolors (m.title ),box[ 5 ] );
422424 bout.bpla (current_line, &abort);
423425 }
424- bout.print (" |#9{}\r\n " , std::string (a ()->user ()->screen_width () - 1 , ' -' ));
426+ bout.print (" |#7\xC0 {}\xD9\r\n " , std::string (a ()->user ()->screen_width () - 3 , box[4 ]));
427+ // bout.print("|#9{}\r\n", std::string(a()->user()->screen_width() - 1, '-'));
425428 bout.outstr (" |#9(|#2Q|#9=|#2Quit|#9, |#2Enter|#9=|#2First Message|#9) \r\n " );
426429 bout.outstr (" |#9Enter message number: " );
427430 const auto res = bin.input_number_hotkey (curmail + 1 , {' Q' }, curmail + 1 , mw, true );
0 commit comments