From 3090282601248d3ce5f91cbddeb450d744b27472 Mon Sep 17 00:00:00 2001 From: FreeArtMan Date: Sat, 24 Jan 2015 19:43:28 +0900 Subject: Fixed bug with drawing last line in motd. New motd --- art/motd.txt | 52 +++++++++++++++++++++++++--------------------------- microbbs.c | 2 ++ motd.c | 3 ++- user.c | 3 +++ 4 files changed, 32 insertions(+), 28 deletions(-) diff --git a/art/motd.txt b/art/motd.txt index a589ca4..3dcf156 100644 --- a/art/motd.txt +++ b/art/motd.txt @@ -1,27 +1,25 @@ - _ ____ ____ _____ - (_) | _ \| _ \ / ____| - _ __ ___ _ ___ _ __ ___ | |_) | |_) | (___ - | '_ ` _ \| |/ __| '__/ _ \| _ <| _ < \___ \ - | | | | | | | (__| | | (_) | |_) | |_) |____) | - |_| |_|_|_|_|\___|_| \___/|____/|____/|_____/ - | | | | - | |__ | |__ ___ - | '_ \| '_ \/ __| - | |_) | |_) \__ \_ - |_.__/|_.__/|___(_) - _ _ _ - | | | | (_) - | |__ __ _ ___| | ___ _ __ __ _ - | '_ \ / _` |/ __| |/ / | '_ \ / _` | - | | | | (_| | (__| <| | | | | (_| |_ - |_| |_|\__,_|\___|_|\_\_|_| |_|\__, (_) - __/ | - _ _ |___/ - | | | | | - __ _| | | _____ _____ __| | ___ _ __ __ _ - / _` | | |/ _ \ \ /\ / / _ \/ _` | / _ \| '__/ _` | - | (_| | | | (_) \ V V / __/ (_| || (_) | | | (_| | - \__,_|_|_|\___/ \_/\_/ \___|\__,_(_)___/|_| \__, | - __/ | - |___/ -Source: ftp://bbs.hacking.allowed.org/microbbs-0.2.2.tar.gz ++------------------------------------------------------------------------------+ +| | +| | +| | +| | +| |\/| |>|> < | +| ^ | |icro|>|> > | +| / \ | +| /_______\ | +| | o o | bbs. | +| \ _ / hacking. | +| //-| |-\\ allowed. | +| \\____ // org | +| |\__/ | | +| | | | +| | | | +| ------- | +| || || | +| // // | +| | +| Day without work | +| Day without food | +| Baizhang Huaihai fam | +| | ++------------------------------------------------------------------------------+ \ No newline at end of file diff --git a/microbbs.c b/microbbs.c index 337e724..1cb1888 100644 --- a/microbbs.c +++ b/microbbs.c @@ -30,7 +30,9 @@ int main( int argc, char **argv ) term_clr_scr( &ts ); //init global variable of bbs user +#ifdef CONFIG_LOGIN bbs_user_init( &g_user ); +#endif //lunch captcha and try to detect if its random bot #ifdef CONFIG_CAPTCHA diff --git a/motd.c b/motd.c index 359834b..df26f11 100644 --- a/motd.c +++ b/motd.c @@ -8,7 +8,7 @@ int bbs_motd_draw( term_screen *ts, const char *fname ) { int posc=0, posr=0; int ret=0; - const int buf_size=80*25+1; + const int buf_size=80*26+1; char buf[buf_size]; int x=0,y=0; int row=0,column=0; @@ -48,6 +48,7 @@ int bbs_motd_draw( term_screen *ts, const char *fname ) } i++; } + fflush( stdout ); } } diff --git a/user.c b/user.c index 512a264..0c0ac94 100644 --- a/user.c +++ b/user.c @@ -1,5 +1,7 @@ #include "user.h" +#ifdef CONFIG_LOGIN + int bbs_login( term_screen *ts ) { int ret=0; @@ -245,3 +247,4 @@ int bbs_user_get_status( bbs_user *bu ) return BBS_USER_GUEST; } +#endif -- cgit v1.2.3