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
➜ Enabling GMCP
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Lerkista
(57 posts) Bio
|
Date
| Thu 21 May 2020 04:30 AM (UTC) Amended on Thu 21 May 2020 06:56 AM (UTC) by Lerkista
|
Message
| Hi
Seeing the other GMCP thread, it looks easy to implement GMCP, so i decided to give a try
But it seems like Mushclient don´t want to use GMCP, my Mushclient version is 5.06, and when my Mud send:
IAC WILL MXP
IAC WILL GMCP
IAC WILL NAWS
The response from Mushclient is:
IAC WILL NAWS IAC DO MXP IAC DONT GMCP IAC WILL NAWS IAC SB NAWS 0 80 0 30 IAC SE
Muschlient responds with IAC DONT GMCP
Any idea of why this happend?
With Mudlet i get this response:
IAC DO MXP IAC DO GMCP IAC SB GMCP 67 111 114 101 46 72 101 108 108 111 32 123 32 34 99 108 105 101 110 116 34 58 32 34 77 117 100 108 101 116 34 44 32 34 118
101 114 115 105 111 110 34 58 32 34 52 46 56 46 50 34 125 IAC SE IAC SB GMCP 67 111 114 101 46 83 117 112 112 111 114 116 115 46 83 101 116 32 91 32 34 67 104 97
114 32 49 34 44 32 34 67 104 97 114 46 83 107 105 108 108 115 32 49 34 44 32 34 67 104 97 114 46 73 116 101 109 115 32 49 34 44 32 34 82 111 111 109 32 49 34 44 32
34 73 82 69 46 82 105 102 116 32 49 34 44 32 34 73 82 69 46 67 111 109 112 111 115 101 114 32 49 34 44 32 34 69 120 116 101 114 110 97 108 46 68 105 115 99 111 114 100
32 49 34 44 32 34 67 108 105 101 110 116 46 77 101 100 105 97 32 49 34 93 IAC SE IAC SB GMCP 69 120 116 101 114 110 97 108 46 68 105 115 99 111 114 100 46 72 101 108
108 111 IAC SE IAC WILL NAWS IAC SB NAWS 0 100 0 37 IAC SE
Mudlet send the client name and version and what supports
But i don´t know why Mudlet allow GMCP but Mushclient don´t
EDIT: Forget it, i suppose Mushclient support GMCP by default, but you need to install a plugin, i installed GMCP_handler_NJG, and worked
The problem i have at this moment, is to handle the response from client, the client send the confirmation for all protocols in one line, so any ideas in how to parse each response and process it? some way to separate each protocol like:
Take the string and separate it in an array or something like that:
str[0]:
IAC DO MXP
str[1]:
IAC DO GMCP
str[2]:
IAC SB GMCP 67 111 114 101 46 72 101 108 108 111 32 123 32 34 99 108 105 101 110 116 34 58 32 34 77 117 100 108 101 116 34 44 32 34 118 101 114 115 105 111 110 34 58 32 34
52 46 56 46 50 34 125 IAC SE
str[3]:
IAC SB GMCP 67 111 114 101 46 83 117 112 112 111 114 116 115 46 83 101 116 32 91 32 34 67 104 97 114 32 49 34 44 32 34 67 104 97 114 46 83 107 105 108 108 115 32 49 34 44 32
34 67 104 97 114 46 73 116 101 109 115 32 49 34 44 32 34 82 111 111 109 32 49 34 44 32 34 73 82 69 46 82 105 102 116 32 49 34 44 32 34 73 82 69 46 67 111 109 112 111 115
101 114 32 49 34 44 32 34 69 120 116 101 114 110 97 108 46 68 105 115 99 111 114 100 32 49 34 44 32 34 67 108 105 101 110 116 46 77 101 100 105 97 32 49 34 93 IAC SE
str[4]:
IAC SB GMCP 69 120 116 101 114 110 97 108 46 68 105 115 99 111 114 100 46 72 101 108 108 111 IAC SE
str[5]:
IAC WILL NAWS
str[6]:
IAC SB NAWS 0 100 0 37 IAC SE
So i can evaluate each one
Can anyone help me with the logic to do that?
My mud is LPC based, and already have the code to handle each one, but i don´t know how to do the split
Thanks | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Thu 21 May 2020 06:53 AM (UTC) |
Message
| |
Posted by
| Lerkista
(57 posts) Bio
|
Date
| Reply #2 on Thu 21 May 2020 06:57 AM (UTC) |
Message
| Yeah i figured that, i´ve edited my post, to another problem i have, thanks | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #3 on Thu 21 May 2020 07:01 AM (UTC) Amended on Thu 21 May 2020 07:07 AM (UTC) by Nick Gammon
|
Message
|
The problem i have at this moment, is to handle the response from client, the client send the confirmation for all protocols in one line, so any ideas in how to parse each response and process it?
The communication between client is not in “lines” in either direction. It is in packets. Your code needs to implement a state machine, allowing for the data to possibly span packets, or indeed to have multiple telnet sequences in a single packet.
There is something fundamentally wrong if you are treating incoming data as lines. It just isn’t. Possibly you are accustomed to one packet from the client being one “message”, but that is pure accident. A long message might span multiple packets.
Basically you should process incoming data, byte by byte. If you get an IAC character (0xFF) you switch to a new state. Then switch again depending on what follows. And so on, until you have left the subnegotiation state.
An example, to get you started, is here.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | 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.
13,685 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top