RanvierMUD / ranvier-telnet

Telnet server and socket with GMCP support
https://npmjs.com/package/ranvier-telnet
MIT License
9 stars 11 forks source link

Missing `GMCP = 0xC9` flag in GMCP frame #10

Closed dandew closed 4 years ago

dandew commented 4 years ago

Currently sendGMCP fails because the GMCP = 0xC9 flag is missing from the GMCP frame.

Fix:

// Add missing Opts.OPT_GMCP
const seqStartBuffer = new Buffer([Seq.IAC, Seq.SB, Opts.OPT_GMCP]);

...

// Bump write size to 5
this.socket.write(Buffer.concat([seqStartBuffer, dataBuffer, seqEndBuffer], gmcpData.length + 5));
dandew commented 4 years ago

Awwgh this has been fixed a long time ago: https://github.com/RanvierMUD/ranvier-telnet/pull/6 🤦🏻‍♂️

I reckon https://github.com/RanvierMUD/ranviermud still transitively pulls an older version, which is how I got the code before it got fixed 😞