Twas Saturday, April 3rd when Alpha said...
Looking for a way to consistently get a user's screen/term size/mode that works across Syncterm, netRunner, MagiTerm, etc.
It's complicated :)
For Telnet connections, you can ask for NAWS which some support. You can also ask for environment variables, which works for some terminals as well. There is also a trick that works for some: Move the cursor to a very large bottom right coordinate (I use 999,999) then issue a ANSI query for cursor position. Not all respond so you have to time out if you get nothing back.
If the connection is over SSL there are similar ways to ask -- and the ANSI ESC trick can still be used.
ENiGMA offers ways to ask the system itself what the user currently has and I imagine many others do as well -- but of course if you've left to a door already that could be lost.
Older door.sys formats and some others included some of this information. Not present in door32 or dorinfo#.def though =) Perhaps querying the system and passing it at the command line.
...so again, it's complicated :D
--
|08 ■ |12NuSkooler |06// |12Xibalba |08- |07"|06The place of fear|07"
|08 ■ |03xibalba|08.|03l33t|08.|03codes |08(|0344510|08/|03telnet|08, |0344511|08/|03ssh|08)
|08 ■ |03ENiGMA 1/2 WHQ |08| |03Phenom |08| |0367 |08| |03iMPURE |08| |03ACiDic
--- ENiGMA 1/2 v0.0.12-beta (linux; x64; 14.15.4)
* Origin: Xibalba -+- xibalba.l33t.codes:44510 (21:1/121)