mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-01 11:36:36 +00:00
[GM Commands] Split GM Commands Into Separate Files (#1766)
* Split GM commands into their own files * Code cleanup
This commit is contained in:
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#include "../client.h"
|
||||
|
||||
void command_delpetition(Client *c, const Seperator *sep)
|
||||
{
|
||||
if (sep->arg[1][0] == 0 || strcasecmp(sep->arg[1], "*") == 0) {
|
||||
c->Message(Chat::White, "Usage: #delpetition (petition number) Type #listpetition for a list");
|
||||
return;
|
||||
}
|
||||
|
||||
c->Message(Chat::Red, "Attempting to delete petition number: %i", atoi(sep->argplus[1]));
|
||||
std::string query = StringFormat("DELETE FROM petitions WHERE petid = %i", atoi(sep->argplus[1]));
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
return;
|
||||
}
|
||||
|
||||
LogInfo("Delete petition request from [{}], petition number:", c->GetName(), atoi(sep->argplus[1]));
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user