| 705 |
ch = igetch_t(MAX_DELAY_TIME); |
ch = igetch_t(MAX_DELAY_TIME); |
| 706 |
while (!SYS_server_exit) |
while (!SYS_server_exit) |
| 707 |
{ |
{ |
| 708 |
|
if (ch != KEY_NULL && ch != KEY_TIMEOUT) |
| 709 |
|
{ |
| 710 |
|
BBS_last_access_tm = time(NULL); |
| 711 |
|
} |
| 712 |
|
|
| 713 |
// extended key handler |
// extended key handler |
| 714 |
if (editor_display_key_handler(&ch, &ctx) != 0) |
if (editor_display_key_handler(&ch, &ctx) != 0) |
| 715 |
{ |
{ |
| 747 |
if ((ch >= 32 && ch < 127) || str_len >= 2 || // Printable character or multi-byte character |
if ((ch >= 32 && ch < 127) || str_len >= 2 || // Printable character or multi-byte character |
| 748 |
ch == CR || ch == KEY_ESC) // Special character |
ch == CR || ch == KEY_ESC) // Special character |
| 749 |
{ |
{ |
|
BBS_last_access_tm = time(NULL); |
|
|
|
|
| 750 |
// Refresh current action while user input |
// Refresh current action while user input |
| 751 |
if (user_online_update(NULL) < 0) |
if (user_online_update(NULL) < 0) |
| 752 |
{ |
{ |
| 840 |
} |
} |
| 841 |
else if (ch == KEY_DEL || ch == BACKSPACE) // Del |
else if (ch == KEY_DEL || ch == BACKSPACE) // Del |
| 842 |
{ |
{ |
|
BBS_last_access_tm = time(NULL); |
|
|
|
|
| 843 |
// Refresh current action while user input |
// Refresh current action while user input |
| 844 |
if (user_online_update(NULL) < 0) |
if (user_online_update(NULL) < 0) |
| 845 |
{ |
{ |
| 931 |
switch (ch) |
switch (ch) |
| 932 |
{ |
{ |
| 933 |
case KEY_NULL: |
case KEY_NULL: |
| 934 |
|
log_error("KEY_NULL\n"); |
| 935 |
|
goto cleanup; |
| 936 |
case KEY_TIMEOUT: |
case KEY_TIMEOUT: |
| 937 |
|
log_error("User input timeout\n"); |
| 938 |
goto cleanup; |
goto cleanup; |
| 939 |
case Ctrl('W'): |
case Ctrl('W'): |
| 940 |
case Ctrl('X'): |
case Ctrl('X'): |
| 1138 |
break; |
break; |
| 1139 |
} |
} |
| 1140 |
|
|
|
BBS_last_access_tm = time(NULL); |
|
|
|
|
| 1141 |
// Refresh current action while user input |
// Refresh current action while user input |
| 1142 |
if (user_online_update(NULL) < 0) |
if (user_online_update(NULL) < 0) |
| 1143 |
{ |
{ |