mirror of
https://github.com/EQEmu/Server.git
synced 2026-11-25 19:07:16 +00:00
add "confirm" check to ^delete
This commit is contained in:
1 parent
3009942ca3
commit
1c72d879cf
1 file changed
+9
@@ -453,6 +453,15 @@ void bot_command_delete(Client *c, const Seperator *sep)
|
||||
return;
|
||||
}
|
||||
|
||||
std::string delete_confirm = sep->arg[1];
|
||||
|
||||
std::string deleted_check = "confirm";
|
||||
|
||||
if (!(delete_confirm.find(deleted_check) != std::string::npos)) {
|
||||
c->Message(Chat::White, "You must type %s confirm to confirm the deletion of %s.", sep->arg[0], my_bot->GetCleanName());
|
||||
return;
|
||||
}
|
||||
|
||||
if (!my_bot->DeleteBot()) {
|
||||
c->Message(Chat::White, "Failed to delete '%s' due to database error", my_bot->GetCleanName());
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user