| 197 |
int ch; |
int ch; |
| 198 |
time_t t_last_action; |
time_t t_last_action; |
| 199 |
|
|
| 200 |
BBS_last_access_tm = t_last_action = time(0); |
BBS_last_access_tm = t_last_action = time(NULL); |
| 201 |
|
|
| 202 |
clearscr(); |
clearscr(); |
| 203 |
|
|
| 211 |
{ |
{ |
| 212 |
ch = igetch(100); |
ch = igetch(100); |
| 213 |
|
|
| 214 |
if (p_bbs_menu->choose_step == 0 && time(0) - t_last_action >= 10) |
if (p_bbs_menu->choose_step == 0 && time(NULL) - t_last_action >= 10) |
| 215 |
{ |
{ |
| 216 |
t_last_action = time(0); |
t_last_action = time(NULL); |
| 217 |
|
|
| 218 |
show_active_board(); |
show_active_board(); |
| 219 |
show_bottom(""); |
show_bottom(""); |
| 226 |
case KEY_NULL: // broken pipe |
case KEY_NULL: // broken pipe |
| 227 |
return 0; |
return 0; |
| 228 |
case KEY_TIMEOUT: |
case KEY_TIMEOUT: |
| 229 |
if (time(0) - BBS_last_access_tm >= MAX_DELAY_TIME) |
if (time(NULL) - BBS_last_access_tm >= MAX_DELAY_TIME) |
| 230 |
{ |
{ |
| 231 |
return 0; |
return 0; |
| 232 |
} |
} |
| 239 |
case EXITBBS: |
case EXITBBS: |
| 240 |
return 0; |
return 0; |
| 241 |
case REDRAW: |
case REDRAW: |
| 242 |
t_last_action = time(0); |
t_last_action = time(NULL); |
| 243 |
clearscr(); |
clearscr(); |
| 244 |
show_top("", BBS_name, ""); |
show_top("", BBS_name, ""); |
| 245 |
show_active_board(); |
show_active_board(); |
| 254 |
iflush(); |
iflush(); |
| 255 |
} |
} |
| 256 |
|
|
| 257 |
BBS_last_access_tm = time(0); |
BBS_last_access_tm = time(NULL); |
| 258 |
} |
} |
| 259 |
|
|
| 260 |
return 0; |
return 0; |