Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUDs
➜ General
➜ Is GMCP still a thing?
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1
2
3
4 5
6
7
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #45 on Sat 02 May 2020 05:25 AM (UTC) Amended on Sat 02 May 2020 05:27 AM (UTC) by Nick Gammon
|
Message
| One thing I encourage you to do is send the room number (vnum). This greatly improves the ability of the mapper to know where you are. Preferably also send known exits and where they lead. For example from https://www.ironrealms.com/gmcp-doc:
Room.Info {“num”: 12345, “name”: “On a hill”, “area”: “Barren hills”, “environment”: “Hills”, “coords”: “45,5,4,3”, “map”: “www.imperian.com/itex/maps/clientmap.php?map=45&level=3 5 4”, “exits”: { “n”: 12344, “se”: 12336 }, “details”: [ “shop”, “bank” ] }
This can be used to make the mapper work quite reliably. In particular the set_uid function can be used to tell the mapper which room you are in.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Xinefus
(106 posts) Bio
|
Date
| Reply #46 on Sat 02 May 2020 09:29 AM (UTC) |
Message
|
Nick Gammon said:
As per my suggestion though, if the client ignores the negotiation you can assume it doesn't support it. So you should really be waiting for "IAC DO GMCP" before sending GMCP stuff.
This sounds like a plan that doesn't force a playerbase to do something they don't want to, even though they should!
I suppose I will go scouring the forum on how to implement this before I emerge in glorious defeat and come begging back here for more juicy knowledge.
Nick Gammon said:
One thing I encourage you to do is send the room number (vnum). This greatly improves the ability of the mapper to know where you are.
I certainly will be following all protocols and recommendations. I want this to enhance the playability, I dont want to move in the wrong direction!
Thank you again! | Top |
|
Posted by
| Xinefus
(106 posts) Bio
|
Date
| Reply #47 on Sat 02 May 2020 09:45 AM (UTC) |
Message
| As per what Nick has posted here: http://www.gammon.com.au/forum/?id=10043&reply=7#reply7.
Though this is one of the first posts done on brainstorming the gmcp protocol, is this still a valid way to implement the negotiation? I need to read it all to see if I understand everything it is doing. There are a few random edits that I'm not quite sure I get yet.
Checking if the ch is 'blind' is essentially what we are doing? | Top |
|
Posted by
| Xinefus
(106 posts) Bio
|
Date
| Reply #48 on Sat 02 May 2020 10:31 AM (UTC) |
Message
| Going through that bit of code changing I am wondering about the part about:
+char * fixup_lua_strings (const char * sce)
Is this a MUSH specific thing? If not implemented, does it cause issues? Or if it is, will it cause issues for other clients? Of course if you are aware.
I am certainly using MUSH and will be moving forward with using the wonderful plugins that gmcp can offer! | Top |
|
Posted by
| Fiendish
USA (2,534 posts) Bio
Global Moderator |
Date
| Reply #49 on Sat 02 May 2020 04:56 PM (UTC) Amended on Sat 02 May 2020 05:05 PM (UTC) by Fiendish
|
Message
| That thread mixes a lot of things together. If all you want to do right now is discover whether the client accepts telnet subnegotiations, then most of that code is unrelated. Also it defines "MUD_SPECIFIC" as \x66 (102), but GMCP would be \xC9 (201), which means that that code predates GMCP. |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Xinefus
(106 posts) Bio
|
Date
| Reply #50 on Sat 02 May 2020 06:54 PM (UTC) Amended on Sat 02 May 2020 07:25 PM (UTC) by Xinefus
|
Message
| Yes, I realised that it was out of date.
From reading the gmcp page, I can see that I must get the GMCP telnet response added and get the server to ask for it from the client upon connection.
I haven't been able to find anything recent that helps to get that telnet negotiation in place.
I took at look at this thread: https://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=10189
But did not have any luck as I believe there is more to it than just those lines. It also would not compile in my version of SMAUGFUSS194 (as stated in an earlier post).
However, I do believe that it belongs within this space in the read_from_buffer similar to how MCCP is negotiated here (TELOPT_COMPRESS2)...
Should I create a new thread for this one, or is this still close enough to the same subject to keep going? | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #51 on Sun 03 May 2020 04:49 AM (UTC) |
Message
| |
Posted by
| Xinefus
(106 posts) Bio
|
Date
| Reply #52 on Sun 10 May 2020 05:34 PM (UTC) |
Message
| Thank you guys!
I gave this a shot.
First impression, I am getting an error when I login... For some reason the negotiation is not working correctly and I get an error:
Enter your character's name, or type new:
admin
tt="version";version=1.0;
Illegal name, try another.
Name:
admin
Password:
Last connected from:
The part in comm.c where we add:
extra MUD status'
write_to_buffer( dnew, want_server_status, 0)
seems to be adding to my first login attemp. If I just put the login twice, everything seems to work fine..
I am using Fiendish's handler he provided me in another thread and it is giving me all my data in JSON.
Is there any indication you can give me why it may be doing this? What could I show/share to help you with this? | Top |
|
Posted by
| Fiendish
USA (2,534 posts) Bio
Global Moderator |
Date
| Reply #53 on Sun 10 May 2020 06:05 PM (UTC) Amended on Sun 10 May 2020 06:32 PM (UTC) by Fiendish
|
Message
| |
Posted by
| Xinefus
(106 posts) Bio
|
Date
| Reply #54 on Sun 10 May 2020 07:23 PM (UTC) Amended on Sun 10 May 2020 09:36 PM (UTC) by Fiendish
|
Message
| My current comm.c can be found at: https://github.com/DBNU-Braska/SMAUG_GMCP/blob/master/comm.c
The MUD_SPECIFIC I have is:
#define MUD_SPECIFIC '\xC9'
The other items I have added (and maybe renamed so I can understand in my mind)
const char gmcp_enabled[] = { ( char )IAC, ( char )WILL, MUD_SPECIFIC, '\0' };
dnew->gmcp_enabled = false;
/*
* extra MUD status
*/
write_to_buffer( dnew, gmcp_enabled, 0 );
if( d->inbuf[i] == ( signed char )MUD_SPECIFIC )
{
if( d->inbuf[i - 1] == ( signed char )DO )
d->gmcp_enabled = true;
write_to_descriptor(d, "\xFF\xFA\xC9tt=\"version\";version=1.0;\xFF\xF0", 0); */
else if( d->inbuf[i - 1] == ( signed char )DONT )
d->gmcp_enabled = false;
}
(Then there are the functions that actually print the GMCP data; char.vitals, char.stats and char.combat is what I have created so far)
These were all the additions within comm.c - not all in the same place of course! I hope that's enough to understand my implementation. It is a variation on what was originally done in the old thread: http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=10043&page=1 | Top |
|
Posted by
| Fiendish
USA (2,534 posts) Bio
Global Moderator |
Date
| Reply #55 on Sun 10 May 2020 09:27 PM (UTC) Amended on Sun 10 May 2020 09:36 PM (UTC) by Fiendish
|
Message
| I notice that you've commented out line 1416. https://github.com/DBNU-Braska/SMAUG_GMCP/blob/master/comm.c#L1416
Please delete that line entirely. That placement is dangerous because you don't have braces around the intended scope of your "if" statement. If you don't know what that means or why it's a problem, I can explain, but history is absolutely littered with avoidable catastrophic bugs because someone thought it would be ok to omit curly braces on single line ifs.
But with that line gone though you would not be seeing that funny version message in your output, so what happens now? |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Xinefus
(106 posts) Bio
|
Date
| Reply #56 on Sun 10 May 2020 10:00 PM (UTC) |
Message
| I removed the commented line,
The error still persists. And, it only does so when I have the handler plugin enabled.
Of course if I commend out line 1090 the error goes away, so maybe that is just in the wrong place? If I comment that out, then the server doesn't send GMCP data. | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #57 on Mon 11 May 2020 06:14 AM (UTC) Amended on Mon 11 May 2020 06:15 AM (UTC) by Nick Gammon
|
Message
| That code is very confusing, whether you wrote it or someone else did.
Can you rework it please? At lines 1396 to 1424 I would like a switch on IAC, eg.
switch (iac)
{
case 0:
// some stuff
break;
case 1:
// some stuff
break;
case 2:
// some stuff
break;
} // end of switch
Offhand it looks like certain conditions are going to affect that lengthy "if" statement with all its "else" clauses in a way you don't want. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Xinefus
(106 posts) Bio
|
Date
| Reply #58 on Mon 11 May 2020 10:35 AM (UTC) Amended on Mon 11 May 2020 11:32 AM (UTC) by Xinefus
|
Message
| Thanks, I will work on this.
Do you believe this could be part of the reason I am getting the login error? it's sending the wrong info to buffer?
The code is the same as the base SMAUGFUSS 1.9 as seen here: https://github.com/nickgammon/smaugfuss/blob/master/src/comm.c#L1389
I have added the GMCP negotiation to be inline with how MCCP negotiation is done (TELOPT_COMPRESS2)
I'll have to work on making this case notation function correctly. | Top |
|
Posted by
| Fiendish
USA (2,534 posts) Bio
Global Moderator |
Date
| Reply #59 on Mon 11 May 2020 01:23 PM (UTC) Amended on Mon 11 May 2020 01:26 PM (UTC) by Fiendish
|
Message
|
Quote: Do you believe this could be part of the reason I am getting the login error? it's sending the wrong info to buffer?
Without really thinking much about it, my first guess is that the error is caused by the the server doing the wrong thing when handler plugin sends the GMCP "hello" message.
But you've only shown us that _something_ didn't work. It would be more informative if you added debug logging to the server to show what it received that it didn't like.
What if you use Nick's modified version from https://github.com/nickgammon/smaugfuss/blob/status_messages/src/comm.c#L1300-L1546 |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
209,051 views.
This is page 4, subject is 7 pages long:
1
2
3
4 5
6
7
It is now over 60 days since the last post. This thread is closed.
Refresh page
top