mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-02 16:46:37 +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
+32
@@ -0,0 +1,32 @@
|
||||
#include "../client.h"
|
||||
|
||||
void command_movechar(Client *c, const Seperator *sep)
|
||||
{
|
||||
if (sep->arg[1][0] == 0 || sep->arg[2][0] == 0) {
|
||||
c->Message(Chat::White, "Usage: #movechar [charactername] [zonename]");
|
||||
}
|
||||
else if (c->Admin() < commandMovecharToSpecials && strcasecmp(sep->arg[2], "cshome") == 0 ||
|
||||
strcasecmp(sep->arg[2], "load") == 0 || strcasecmp(sep->arg[2], "load2") == 0) {
|
||||
c->Message(Chat::White, "Invalid zone name");
|
||||
}
|
||||
else {
|
||||
uint32 tmp = database.GetAccountIDByChar(sep->arg[1]);
|
||||
if (tmp) {
|
||||
if (c->Admin() >= commandMovecharSelfOnly || tmp == c->AccountID()) {
|
||||
if (!database.MoveCharacterToZone((char *) sep->arg[1], ZoneID(sep->arg[2]))) {
|
||||
c->Message(Chat::White, "Character Move Failed!");
|
||||
}
|
||||
else {
|
||||
c->Message(Chat::White, "Character has been moved.");
|
||||
}
|
||||
}
|
||||
else {
|
||||
c->Message(Chat::Red, "You cannot move characters that are not on your account.");
|
||||
}
|
||||
}
|
||||
else {
|
||||
c->Message(Chat::White, "Character Does Not Exist");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user