Issue with blank spacing

Posted by Dretzile on Mon 12 Nov 2012 02:13 AM — 5 posts, 23,715 views.

USA #0
I recently compiled smaugfuss 1.9 on a Raspberry Pi, with a lot of coffee, a few advil and a decent amount of searching through the files I was successfully able to get it compiled, It's running nearly perfectly, but there are two problems I have noticed so far.

First, whenever someone logs in, every time they type their name the first time, it says that the name is illegal, the second time the name is typed in it accepts it every time.

Second, every time I pull up wizlist, it shows the information that is located in the wizlist file, but everything after that appears as a y with 2 dots over it (ÿ). The link at the bottom of the post is a link to an image of what i'm talking about. I've double checked and there are no spaces after the information in the wizlist file.

http://imgur.com/PJVPA
Australia Forum Administrator #1
It's to do with Telnet subnegotiation. The ÿ character is 0xFF (IAC).

I think the client is asking something like "do you support NAWS?" with the negotiation. Since it only asks once, if you log in again it works.

The proper way to handle it would be to add subnegotiation handling to the input handler. I think there are snippets around on this site about doing that.
USA #2
I'm not one to ask for help without trying everything and searching everywhere I can on my own first, but I cannot seem to find any snippets that add subnegotiation. Perhaps I'm not very good at searching, but you wouldn't happen to know where I could find this at, would you?

I greatly appreciate any help provided.
USA #3
Take a look at the following, it started out as my attempt at telnet negotiation for Smaug but as it grew past that rather quickly you will have to adapt it.

telnet.h
http://pastebin.com/ZYbujsm7
telnetOptions.c
http://pastebin.com/1uLRgjnJ

Hope this helps you.
Australia Forum Administrator #4
Example code here:

https://github.com/nickgammon/smaugfuss/blob/status_messages/src/comm.c

Also:

Template:post=10043
Please see the forum thread: http://gammon.com.au/forum/?id=10043.


Read the lot if you like, but on page 1, scroll down to: "Changes to SmaugFuss 1.9 source"