-
Notifications
You must be signed in to change notification settings - Fork 88
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
Conversation
Update local
Update local
Added call to LuaBot for testing. Message sends to client but nothing happens.
There was a problem hiding this 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)
This comment has been minimized.
This comment has been minimized.
Changed file name to match class as well.
\forcelogout player_name message
There was a problem hiding this 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()); |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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
There was a problem hiding this 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
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?