summaryrefslogtreecommitdiffstats
path: root/microbbs.c
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2015-01-07 21:00:59 +0900
committerFreeArtMan <dos21h@gmail.com>2015-01-07 21:00:59 +0900
commit03e459e7dff84c44644b1eccc0e00b73d846fe2a (patch)
tree00269e56bdf53906396199e22dcabe8bbee9592f /microbbs.c
parent0ab31d63699467d72f09327171b735ed2152bf2c (diff)
downloadmicrobbs-03e459e7dff84c44644b1eccc0e00b73d846fe2a.tar.gz
microbbs-03e459e7dff84c44644b1eccc0e00b73d846fe2a.zip
Small fixes about loging and libterm
Diffstat (limited to 'microbbs.c')
-rw-r--r--microbbs.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/microbbs.c b/microbbs.c
index 0adddbc..7670ddd 100644
--- a/microbbs.c
+++ b/microbbs.c
@@ -17,18 +17,20 @@ int main( int argc, char **argv )
term_screen ts;
term_init( &ts );
+ term_clr_scr( &ts );
//lunch captcha and try to detect if its random bot
#ifdef CONFIG_CAPTCHA
if ( captcha_test1() != 1)
return 1;
+ bbs_log_captcha( NULL );
#endif
//write to log that some user have accesed bbs
//too much fake stuff comes to log
- //bbs_log( NULL ); //write to default place
+ bbs_log_main( NULL ); //write to default place
#ifdef CONFIG_MOTD
- bbs_login_motd( &ts, "art/motd.txt" );
+ bbs_login_motd( NULL, "art/motd.txt" );
print_build_info();
#endif
@@ -81,6 +83,8 @@ int main( int argc, char **argv )
}
break;
#endif
+
+ //------------------------------------------------------------------
case 's':
case 'S':
{
@@ -118,6 +122,7 @@ int main( int argc, char **argv )
break;
#endif
+ //------------------------------------------------------------------
#ifndef CONFIG_MESSAGING
case 'g':
case 'G':
@@ -159,6 +164,7 @@ int main( int argc, char **argv )
break;
#endif
+ //------------------------------------------------------------------
case 'q':
case 'Q':
bbs_log_quit( NULL );
@@ -171,5 +177,8 @@ int main( int argc, char **argv )
#ifdef CONFIG_MOTD
bbs_quit_motd( &ts, "art/quit.txt" );
#endif
+
+ term_clr_scr( &ts );
+ term_set_orig_mode( &ts );
return 0;
}