TT++ and GMCP

Need some help with your MUD client? Forgot your password? Get help here.
Forum rules
- Use common sense and be respectful towards each other at all times, even when disagreeing.
- Do not reveal sensitive game information. Guild secrets, player seconds are examples of things not allowed.
Post Reply
Ormtunga
Novice
Posts: 4
Joined: 03 Feb 2014 14:31

TT++ and GMCP

Post by Ormtunga » 05 Feb 2014 18:33

Hi!

I've been trying to get GMCP to work in TT++ with Genesis, without much success. I'm not that worried about how to handle the data sent from Genesis but I am struggling with establishing communication. I've tried GMCP in aardwolf and it worked so should be a problem specific to Genesis. I realize that maybe you are not aware how tt++ handles GMCP but maybe information about the handshaking process could help sort things out.

As a base im defining the following commands:

Code: Select all

#format IAC  %a 255
#format DONT %a 254
#format DO   %a 253
#format WONT %a 252
#format WILL %a 251                                                 
#format SB   %a 250
#format SE   %a 240

#format GMCP %a 201
#config {debug telnet} {on}


#var CLIENT_NAME TinTin++
#var CLIENT_VERSION 2.00.9

#event {IAC WILL GMCP}
{       
	#send {$IAC$DO$GMCP\};
        #send {$IAC$SB$GMCP Core.Hello { "client": "$CLIENT_NAME", "version": "$CLIENT_VERSION" } $IAC$SE\};
        #send {$IAC$SB$GMCP Core.Supports.Set [ "Core 1", "Char 1", "Room 1"] $IAC$SE\};
}
NOTE: the above code works in aardmud and I recieve lots of core and char variables from the server.

I recieve the following from the server upon connection:

Code: Select all

RCVD IAC WILL GMCP
At which point I can send ONLY "#send {$IAC$DO$GMCP\};" which allows me to get:

Code: Select all

IAC SB GMCP core.goodbye IAC SE
So completely removing the hello and supports.set still renders the above message upon quitting. I've tried small letters in core.hello, moving the ':' around and typing client names and versions manually, same outcome.

For some reason my 'Core.Hello' does not work, also since the Core.Hello doesnt work I guess the 'Core.Supports.Set' doesnt work neither. I got GMCP to work in mudlet but I have no idea how its doing the handshaking. Any ideas on what I should write to get it to work? Is it something serverside that says my client is invalid or something? Can I try pretending to be some other client to force Genesis to send me data?

I made a core.goodbye event which print some nonsense on my screen when it is recieved so the events are clearly working, as in doing something when something is recieved.

Lastly I want to say I dont actually play aardmud I just tried it for the GMCP :)

Approciate some help!

User avatar
cotillion
Site Admin
Posts: 350
Joined: 04 Mar 2010 01:14

Re: TT++ and GMCP

Post by cotillion » 06 Feb 2014 21:23

Could you try:

#send {$IAC$SB${GMCP}Core.Hello { "client": "$CLIENT_NAME", "version": "$CLIENT_VERSION" } $IAC$SE\};

Ormtunga
Novice
Posts: 4
Joined: 03 Feb 2014 14:31

Re: TT++ and GMCP

Post by Ormtunga » 06 Feb 2014 23:54

Thanks for trying to help! I tried and no difference, I can write {GMCP} on all #send and still only get the IAC SB GMCP core.goodbye IAC SE upon quitting. I've tried lots of different ways of typing it with no success. Letting TT++ writing setting #vars client and version, typing it manually, using [ ] in core hello, using = instead of :, moving : around, using capital letters here and there. Is there any way I can somehow get feedback wether it is the Core.Hello or the Core.Supports.Set thats malfunctioning? Does the server send any data after a successful Core.Hello?

User avatar
cotillion
Site Admin
Posts: 350
Joined: 04 Mar 2010 01:14

Re: TT++ and GMCP

Post by cotillion » 07 Feb 2014 10:47

The problem seems to be that the server considers the package name of your GMCP requests to be a part of the JSON

It expects the package to be:
<IAC><SB><GMCP>Package { JSON }<IAC><SE>

It seems to be receiving something like:
<IAC><SB><GMCP> Package { JSON }<IAC><SE>

That extra space prevents things from working.

Ormtunga
Novice
Posts: 4
Joined: 03 Feb 2014 14:31

Re: TT++ and GMCP

Post by Ormtunga » 07 Feb 2014 13:42

Its working now! I rewrote to this:

Code: Select all

#event {IAC WILL GMCP}
{       
	#send {$IAC$DO$GMCP\};
	#send {$IAC$SB${GMCP}Core.Hello { "client": "$CLIENT_NAME", "version": "$CLIENT_VERSION" } $IAC$SE\};     
	#send {$IAC$SB${GMCP}Core.Supports.Set [ "Core 1", "Char 1", "Room 1" ] $IAC$SE\}
	
}
Which is exactly what you wrote in your last post, sorry. I must have only changed the Core.Hello and forgotten about removing the space in Core.Supports.Set. Anyway, im very happy to see it working so thank you very much for helping me out!

Post Reply
http://tworzymyatmosfere.pl/przescieradla-jedwabne-z-gumka/