mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
30 lines
575 B
C++
Executable File
30 lines
575 B
C++
Executable File
#include "../client.h"
|
|
|
|
void command_disablerecipe(Client *c, const Seperator *sep)
|
|
{
|
|
int arguments = sep->argnum;
|
|
if (!arguments || !sep->IsNumber(1)) {
|
|
c->Message(Chat::White, "Usage: #disablerecipe [Recipe ID]");
|
|
return;
|
|
}
|
|
|
|
auto recipe_id = std::stoul(sep->arg[1]);
|
|
if (!recipe_id) {
|
|
c->Message(Chat::White, "Usage: #disablerecipe [Recipe ID]");
|
|
return;
|
|
}
|
|
|
|
c->Message(
|
|
Chat::White,
|
|
fmt::format(
|
|
"Recipe ID {} {} disabled.",
|
|
recipe_id,
|
|
(
|
|
content_db.DisableRecipe(recipe_id) ?
|
|
"successfully" :
|
|
"failed to be"
|
|
)
|
|
).c_str()
|
|
);
|
|
}
|