Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force Client Logout / Early test #700

Closed
wants to merge 7 commits into from

Conversation

ZopharShinta
Copy link
Contributor

Added the code to LuaBot to kick the player that selected it.
Will need to add the option to enter player name or show listed of players, like the mapmenu?

Added call to LuaBot for testing.
Message sends to client but nothing happens.
Copy link
Collaborator

@broxen broxen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really good, just a few minor nits.

I'll try to pull down tonight to play around with it and see if we can figure out why it doesn't do what's expected (force logout)

Projects/CoX/Common/Messages/Map/ForceClientLogout.h Outdated Show resolved Hide resolved
Projects/CoX/Common/Messages/Map/ForceClientLogout.h Outdated Show resolved Hide resolved
Projects/CoX/Common/Messages/Map/ForceClientLogout.h Outdated Show resolved Hide resolved
Projects/CoX/Servers/MapServer/DataHelpers.cpp Outdated Show resolved Hide resolved
@broxen broxen added the enhancement Enhancement to server functionality. label Nov 20, 2018
@broxen broxen added this to the Version 0.7: Name TBD milestone Nov 20, 2018
@broxen

This comment has been minimized.

Changed file name to match class as well.
\forcelogout player_name message
Copy link
Collaborator

@broxen broxen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. A couple small changes for the new slash command.

Really appreciate you working on this!

return;
}

sendForceLogout(sess, parts[1].toUtf8(), parts[2].toUtf8());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will cut off longer messages like /forceLogout $target "I'm kicking you with this longer message, but it will get cut off, even if I wrap it in quotes" as parts[2] will equal "I'm

One solution would be to follow the format of cmdHandler_InfoMessage() to capture anything after the 2nd space in the string.


if(parts.size() < 2)
{
qCDebug(logSlashCommand) << "Bad invocation: " << cmd;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I apologize, because I set the example with this "bad invocation" output, but the truth is that we should be more verbose with our error feedback.

I would describe the format this slash command expects so that users know what they should type

Sending all of the logout message.
Updated error message to show example of slash command
Copy link
Collaborator

@broxen broxen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why this doesn't actually force the client logout, but the codes looks good.

Will pull down and troubleshoot after the holiday

The slash command now works.
No sense to add it for LuaBot for now.

/forceLogout playername disconnect message
@ZopharShinta ZopharShinta deleted the ForceLogout branch December 9, 2018 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to server functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants