Fix access-control by terminal cap issue introduced a week ago
In commit 3f17c245, I was addressing the issue reported by Nelgin via IRC: <nelgin> If you login using a term that doesn't support ansi, it changes your settings - can you set 'em back when done? <DigitalMan> if you have auto-term enabled, it doesn't actually change your settings, just what's in use during that session <nelgin> I logged in using my BBC emulator which doesn't do ansi, then when I logged in through syncterm, I got the display like it was on the BBC. All my characters replaced with #'s and stuff. <nelgin> I had to go back into the user menu to fix it. That is going to confuse users. However, the chk_ar() function in userdat.c which is used to populate JS objects (e.g. xtrn_area.sec_list[].prog_list[]) uses the user.misc value (cannot call term_supports()), so the current user terminal flags need to be reflected in user.misc always. So the real fix for the originally reported problem is to clear the charset-related terminal settings when logging in with auto-terminal settings enabled (and before the auto-detected charset flags are OR'd in). I toyed with the idea of storing a copy of the term_supports() result in client_t, which is passed to chk_ar() when appropriate, but decided that was a bit overkill and there were issues with servers that don't have term_supports (e.g. the web server) and properly populating access-controlled areas in the JS object model (e.g. door games that require ANSI). Better to use the last-auto-detected terminal caps than assuming "no" terminal capabilities in that scenario.
Status | Job ID | Name | Coverage | ||||||
---|---|---|---|---|---|---|---|---|---|
Build | |||||||||
passed |
#30110
FreeBSD
|
jsdoor-freebsd |
00:04:05
|
|
|||||
passed |
#30111
Linux
|
jsdoor-linux |
00:09:16
|
|
|||||
passed |
#30113
FreeBSD
|
jsdoor-windows |
00:01:57
|
|
|||||
passed |
#30105
FreeBSD
|
sbbs-freebsd |
00:05:46
|
|
|||||
passed |
#30100
Linux
|
sbbs-linux |
00:12:59
|
|
|||||
passed |
#30103
Windows
|
sbbs-windows |
00:05:48
|
|
|||||
passed |
#30112
FreeBSD
|
sexpots-freebsd |
00:00:13
|
|
|||||
passed |
#30101
Linux
|
sexpots-linux |
00:00:20
|
|
|||||
passed |
#30104
Windows
|
sexpots-windows |
00:00:37
|
|
|||||
passed |
#30108
FreeBSD
|
syncdraw-freebsd |
00:00:30
|
|
|||||
passed |
#30109
Linux
|
syncdraw-linux |
00:01:22
|
|
|||||
passed |
#30106
FreeBSD
|
syncterm-freebsd |
00:01:06
|
|
|||||
passed |
#30102
Linux
|
syncterm-linux |
00:04:14
|
|
|||||
passed |
#30107
FreeBSD
|
syncterm-windows |
00:01:52
|
|
|||||