| 1 |
/*************************************************************************** |
/*************************************************************************** |
| 2 |
bbs_main.c - description |
bbs_main.c - description |
| 3 |
------------------- |
------------------- |
| 4 |
begin : Mon Oct 18 2004 |
Copyright : (C) 2004-2025 by Leaflet |
| 5 |
copyright : (C) 2004 by Leaflet |
Email : leaflet@leafok.com |
|
email : leaflet@leafok.com |
|
| 6 |
***************************************************************************/ |
***************************************************************************/ |
| 7 |
|
|
| 8 |
/*************************************************************************** |
/*************************************************************************** |
| 9 |
* * |
* * |
| 10 |
* This program is free software; you can redistribute it and/or modify * |
* This program is free software; you can redistribute it and/or modify * |
| 11 |
* it under the terms of the GNU General Public License as published by * |
* it under the terms of the GNU General Public License as published by * |
| 12 |
* the Free Software Foundation; either version 2 of the License, or * |
* the Free Software Foundation; either version 3 of the License, or * |
| 13 |
* (at your option) any later version. * |
* (at your option) any later version. * |
| 14 |
* * |
* * |
| 15 |
***************************************************************************/ |
***************************************************************************/ |
| 63 |
show_bottom(""); |
show_bottom(""); |
| 64 |
display_menu(get_menu(&bbs_menu, "TOPMENU")); |
display_menu(get_menu(&bbs_menu, "TOPMENU")); |
| 65 |
|
|
| 66 |
while (!SYS_exit) |
while (!SYS_server_exit) |
| 67 |
{ |
{ |
| 68 |
ch = igetch(0); |
ch = igetch(0); |
| 69 |
|
|
| 77 |
switch (ch) |
switch (ch) |
| 78 |
{ |
{ |
| 79 |
case KEY_NULL: |
case KEY_NULL: |
| 80 |
return 0; |
return -1; |
| 81 |
case KEY_TIMEOUT: |
case KEY_TIMEOUT: |
| 82 |
if (time(0) - BBS_last_access_tm >= MAX_DELAY_TIME) |
if (time(0) - BBS_last_access_tm >= MAX_DELAY_TIME) |
| 83 |
{ |
{ |
| 84 |
return -1; |
return 0; |
| 85 |
} |
} |
|
continue; |
|
| 86 |
default: |
default: |
| 87 |
redraw = 1; |
redraw = 1; |
| 88 |
switch (menu_control(&bbs_menu, ch)) |
switch (menu_control(&bbs_menu, ch)) |