mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
[World CLI] Refactor world CLI to be easier to reason about (#2441)
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#include "../worlddb.h"
|
||||
|
||||
void WorldserverCLI::DatabaseSetAccountStatus(int argc, char **argv, argh::parser &cmd, std::string &description)
|
||||
{
|
||||
description = "Sets account status by account name";
|
||||
|
||||
std::vector<std::string> arguments = {
|
||||
"{name}",
|
||||
"{status}"
|
||||
};
|
||||
|
||||
std::vector<std::string> options = {};
|
||||
|
||||
if (cmd[{"-h", "--help"}]) {
|
||||
return;
|
||||
}
|
||||
|
||||
EQEmuCommand::ValidateCmdInput(arguments, options, cmd, argc, argv);
|
||||
|
||||
database.SetAccountStatus(
|
||||
cmd(2).str(),
|
||||
std::stoi(cmd(3).str())
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user