diff --git a/.gitignore b/.gitignore index f15af53..b58b14e 100644 --- a/.gitignore +++ b/.gitignore @@ -80,3 +80,4 @@ core docs/site utils/reset_pass/reset_pass .vscode +last10v2.dat diff --git a/STRINGS.CHANGES b/STRINGS.CHANGES index 5484a9e..2201bb8 100644 --- a/STRINGS.CHANGES +++ b/STRINGS.CHANGES @@ -35,6 +35,10 @@ LINE: 280 NEW OLDSTRING: (NONE) NEWSTRING: "Read Now ? (Y / N): " +LINE: 5 MODIFIED +OLDSTRING: "\e[1;37m%-16s \e[1;36m%-32s \e[1;32m%02d:%02d %02d-%02d-%02d\e[0m\r\n" +NEWSTRING: "\e[1;37m%-16s \e[1;36m%-32s \e[1;32m%02d:%02d %02d-%02d-%02d \e[1;33m%c\e[0m\r\n" + Changes from v0.8-alpha -> v0.9-alpha -------------------------------------------------------------- LINE: 255 NEW diff --git a/dist/ansis/bulletin1.ans b/dist/ansis/bulletin1.ans index 84a8e84..8d24667 100644 Binary files a/dist/ansis/bulletin1.ans and b/dist/ansis/bulletin1.ans differ diff --git a/dist/magicka.strings b/dist/magicka.strings index 356fc3a..ed34b46 100644 --- a/dist/magicka.strings +++ b/dist/magicka.strings @@ -2,7 +2,7 @@ \r\n\r\nTimeout waiting for input..\r\n \r\n\e[1;37mLast 10 callers:\r\n \e[1;30m-------------------------------------------------------------------------------\r\n -\e[1;37m%-16s \e[1;36m%-32s \e[1;32m%02d:%02d %02d-%02d-%02d\e[0m\r\n +\e[1;37m%-16s \e[1;36m%-32s \e[1;32m%02d:%02d %02d-%02d-%02d \e[1;33m%c\e[0m\r\n \e[1;30m-------------------------------------------------------------------------------\e[0m\r\n \e[1;37mPress any key to continue...\e[0m\r\n \r\n\r\n\e[1;37mSystem Information\r\n diff --git a/dist/scripts/login_stanza.lua b/dist/scripts/login_stanza.lua index 1574bd7..27dc33b 100644 --- a/dist/scripts/login_stanza.lua +++ b/dist/scripts/login_stanza.lua @@ -60,9 +60,13 @@ bbs_write_string("\r\n\r\n\027[1;37mLast 10 callers:\r\n"); bbs_write_string("\027[1;30m-------------------------------------------------------------------------------\r\n"); while (i < 10) do - user, location, ltime = bbs_read_last10(i); + user, location, ltime, calls = bbs_read_last10(i); if (user ~= nil) then - bbs_write_string(string.format("\027[1;37m%-16s \027[1;36m%-32s \027[1;32m%s\r\n", user, location, os.date("%H:%M %d-%m-%y" ,ltime))); + if calls == 1 then + bbs_write_string(string.format("\027[1;37m%-16s \027[1;36m%-32s \027[1;32m%s \027[1;33mN\r\n", user, location, os.date("%H:%M %d-%m-%y" ,ltime))); + else + bbs_write_string(string.format("\027[1;37m%-16s \027[1;36m%-32s \027[1;32m%s\r\n", user, location, os.date("%H:%M %d-%m-%y" ,ltime))); + end end i = i + 1; diff --git a/dist/www-bootstrap/static/newuser.png b/dist/www-bootstrap/static/newuser.png new file mode 100644 index 0000000..5950e99 Binary files /dev/null and b/dist/www-bootstrap/static/newuser.png differ diff --git a/dist/www-bootstrap/static/style-mobile.css b/dist/www-bootstrap/static/style-mobile.css index 19e560a..9795987 100644 --- a/dist/www-bootstrap/static/style-mobile.css +++ b/dist/www-bootstrap/static/style-mobile.css @@ -341,6 +341,19 @@ max-width: 100%; } +.last10-new { + position: relative; + width: 100%; + min-height: 1px; + padding-right: 15px; + padding-left: 15px; + + -webkit-box-flex: 0; + -ms-flex: 100%; + flex: 0 0 100%; + max-width: 100%; +} + #msgbody { background-color: black; color: gray; diff --git a/dist/www-bootstrap/static/style.css b/dist/www-bootstrap/static/style.css index 24a9635..c622ff8 100644 --- a/dist/www-bootstrap/static/style.css +++ b/dist/www-bootstrap/static/style.css @@ -331,9 +331,22 @@ padding-left: 15px; -webkit-box-flex: 0; - -ms-flex: 0 0 33.333333%; - flex: 0 0 33.333333%; - max-width: 33.333333%; + -ms-flex: 0 0 23.333333%; + flex: 0 0 23.333333%; + max-width: 23.333333%; +} + +.last10-new { + position: relative; + width: 100%; + min-height: 1px; + padding-right: 15px; + padding-left: 15px; + + -webkit-box-flex: 0; + -ms-flex: 0 0 10%; + flex: 0 0 10%; + max-width: 10%; } #msgbody { diff --git a/src/bbs.c b/src/bbs.c index 95d5d95..587e27e 100644 --- a/src/bbs.c +++ b/src/bbs.c @@ -672,7 +672,7 @@ void record_last10_callers(struct user_record *user) { struct last10_callers callers[10]; int i,j; - FILE *fptr = fopen("last10.dat", "rb"); + FILE *fptr = fopen("last10v2.dat", "rb"); if (fptr != NULL) { for (i=0;i<10;i++) { @@ -690,13 +690,13 @@ void record_last10_callers(struct user_record *user) { strcpy(new_entry.name, user->loginname); strcpy(new_entry.location, user->location); new_entry.time = time(NULL); - + new_entry.calls = user->timeson; if (i == 10) { j = 1; } else { j = 0; } - fptr = fopen("last10.dat", "wb"); + fptr = fopen("last10v2.dat", "wb"); for (;j
%s
%s
%.2d:%.2d %.2d-%.2d-%.2d
\n", callers[z].name, callers[z].location, l10_time.tm_hour, l10_time.tm_min, l10_time.tm_mon + 1, l10_time.tm_mday, l10_time.tm_year - 100); + if (callers[z].calls == 1) { + sprintf(buffer, "
%s
%s
%.2d:%.2d %.2d-%.2d-%.2d
\n", callers[z].name, callers[z].location, l10_time.tm_hour, l10_time.tm_min, l10_time.tm_mon + 1, l10_time.tm_mday, l10_time.tm_year - 100, conf.www_url); + } else { + sprintf(buffer, "
%s
%s
%.2d:%.2d %.2d-%.2d-%.2d
\n", callers[z].name, callers[z].location, l10_time.tm_hour, l10_time.tm_min, l10_time.tm_mon + 1, l10_time.tm_mday, l10_time.tm_year - 100); + } } else { - sprintf(buffer, "
%s
%s
%.2d:%.2d %.2d-%.2d-%.2d
\n", callers[z].name, callers[z].location, l10_time.tm_hour, l10_time.tm_min, l10_time.tm_mday, l10_time.tm_mon + 1, l10_time.tm_year - 100); + if (callers[z].calls == 1) { + sprintf(buffer, "
%s
%s
%.2d:%.2d %.2d-%.2d-%.2d
\n", callers[z].name, callers[z].location, l10_time.tm_hour, l10_time.tm_min, l10_time.tm_mday, l10_time.tm_mon + 1, l10_time.tm_year - 100, conf.www_url); + } else { + sprintf(buffer, "
%s
%s
%.2d:%.2d %.2d-%.2d-%.2d
\n", callers[z].name, callers[z].location, l10_time.tm_hour, l10_time.tm_min, l10_time.tm_mday, l10_time.tm_mon + 1, l10_time.tm_year - 100); + } } if (len + strlen(buffer) > max_len - 1) { max_len += 4096;