Skip to content
Snippets Groups Projects
Commit 0d26e562 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

When console output is off, ignore most Ctrl-A codes

Ctrl-A codes that cause cursor movement or attribute changes or anything except toggling the console output will now be ignored when console output is off.
parent 2cc09ca0
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #835 passed
...@@ -1060,13 +1060,6 @@ void sbbs_t::ctrl_a(char x) ...@@ -1060,13 +1060,6 @@ void sbbs_t::ctrl_a(char x)
console^=(CON_ECHO_OFF); console^=(CON_ECHO_OFF);
return; return;
} }
if((uchar)x>0x7f) {
cursor_right((uchar)x-0x7f);
return;
}
if(IS_DIGIT(x)) { /* background color */
atr &= (BG_BRIGHT|BLINK|0x0f);
}
switch(toupper(x)) { switch(toupper(x)) {
case '!': /* level 10 or higher */ case '!': /* level 10 or higher */
if(useron.level<10) if(useron.level<10)
...@@ -1107,6 +1100,18 @@ void sbbs_t::ctrl_a(char x) ...@@ -1107,6 +1100,18 @@ void sbbs_t::ctrl_a(char x)
case ')': /* turn echo back on */ case ')': /* turn echo back on */
console&=~CON_ECHO_OFF; console&=~CON_ECHO_OFF;
break; break;
}
if(console & CON_ECHO_OFF)
return;
if((uchar)x>0x7f) {
cursor_right((uchar)x-0x7f);
return;
}
if(IS_DIGIT(x)) { /* background color */
atr &= (BG_BRIGHT|BLINK|0x0f);
}
switch(toupper(x)) {
case '+': /* push current attribute */ case '+': /* push current attribute */
if(attr_sp<(int)sizeof(attr_stack)) if(attr_sp<(int)sizeof(attr_stack))
attr_stack[attr_sp++]=curatr; attr_stack[attr_sp++]=curatr;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment