Improve: add support for Telnet AreYouThere command#7050
Improve: add support for Telnet AreYouThere command#7050SlySven merged 5 commits intoMudlet:developmentfrom
Conversation
Following a discussion in the "#coding" channel in the MUD guild on Discord: https://canary.discord.com/channels/279748146316312576/359062772337606656/1187507352346304583 I pointed out that Mudlet does not respond to the AYT command. This PR fixes that so that it immediately responds (with one of a number of random text phrases) when it gets that command - which should fulfil the requirements for that. It also increases the number of Telnet commands that get reported (to all of them) in debug output - including the AYT one. To see them it will be necessary to changed the `DEBUG_TELNET` #define from the `1` it had been left as (perhaps it should have been left undefined after Mudlet#2236 was merged) to `2`. Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
|
Hey there! Thanks for helping Mudlet improve. 🌟 Test versionsYou can directly test the changes here:
No need to install anything - just unzip and run. |
Fixes this notification from CodeFactor: "Storage-class specifier (static, extern, typedef, etc) should be at the beginning of the declaration." for src/ctelnet Line 1011. Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Kebap
left a comment
There was a problem hiding this comment.
Seems legit.
This also somewhat refactors the case handling of telnetCommand[1] in ctelnet.cpp file.
Also moves the debug configuration out of there into the respective CMakeLists.txt and mudlet.pro files.
Thought this was worth a mention here.
src/ctelnet.cpp
Outdated
| // expects is "something" - so let's keep 'em guessing 8-) - SlySven | ||
| const static QByteArrayList randomStrings = { | ||
| {"Yep."}, | ||
| {"You bet your sweet arse I am!"}, |
There was a problem hiding this comment.
| {"You bet your sweet arse I am!"}, |
Think of the children!
There was a problem hiding this comment.
Would s/arse/cheeks/ be acceptable? 😜
Though https://www.indy100.com/viral/british-swear-word-ranked-offensiveness-2659905092 reports that in a survey the word ranks only as "mild" :
Words rated as mild were thought to be okay to use around children, whereas medium words were seen by most to be potentially unacceptable before the 9pm watershed. The vast majority thought the strong words should definitely be saved for after 9pm.
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
vadi2
left a comment
There was a problem hiding this comment.
Looks good to me in general. Can we get 2-3 game admins to implement this in their games so it has some real world testing before we merge?
|
Ah, trying to determine what the correct response to an
Then later in the same document:
There is no "standard" reply but the most popular one I have seen in on-line examples which actually offer one is a simple "YES" - the trouble with my fancy "random" strings is knowing that they were sent in response to an |
SlySven
left a comment
There was a problem hiding this comment.
Nuke the random replies.
#### Motivation for adding to Mudlet Following a discussion in the "#coding" channel in the MUD guild on Discord: https://canary.discord.com/channels/279748146316312576/359062772337606656/1187507352346304583 I pointed out that Mudlet does not respond to the AYT command. #### Brief overview of PR changes/additions This PR fixes that so that it immediately responds (with "YES") when it gets that command - which should fulfil the requirements for that command. It also increases the number of Telnet commands that get reported (to all of them) in debug output - including the AYT one. To see them it will be necessary to changed the `DEBUG_TELNET` #define from the `1` it had been left as (perhaps it should have been left undefined after Mudlet#2236 was merged) to `2`. #### Other info (issues closed, discussion etc) None --------- Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Motivation for adding to Mudlet
Following a discussion in the "#coding" channel in the MUD guild on Discord: https://canary.discord.com/channels/279748146316312576/359062772337606656/1187507352346304583 I pointed out that Mudlet does not respond to the AYT command.
Brief overview of PR changes/additions
This PR fixes that so that it immediately responds (with one of a number of random text phrases) when it gets that command - which should fulfil the requirements for that command.
It also increases the number of Telnet commands that get reported (to all of them) in debug output - including the AYT one. To see them it will be necessary to changed the
DEBUG_TELNET#define from the1it had been left as (perhaps it should have been left undefined after #2236 was merged) to2.Other info (issues closed, discussion etc)
None