mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 13:41:31 +00:00
Update console.cpp
This commit is contained in:
parent
c7e196e26d
commit
bb7cae46c5
@ -236,6 +236,7 @@ void ConsoleMd5(
|
|||||||
|
|
||||||
uint8 md5[16];
|
uint8 md5[16];
|
||||||
MD5::Generate((const uchar *) args[0].c_str(), strlen(args[0].c_str()), md5);
|
MD5::Generate((const uchar *) args[0].c_str(), strlen(args[0].c_str()), md5);
|
||||||
|
|
||||||
connection->SendLine(
|
connection->SendLine(
|
||||||
StringFormat(
|
StringFormat(
|
||||||
"MD5: %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
|
"MD5: %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
|
||||||
@ -255,7 +256,8 @@ void ConsoleMd5(
|
|||||||
md5[13],
|
md5[13],
|
||||||
md5[14],
|
md5[14],
|
||||||
md5[15]
|
md5[15]
|
||||||
));
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -872,242 +874,37 @@ void ConsoleQuit(
|
|||||||
/**
|
/**
|
||||||
* @param console
|
* @param console
|
||||||
*/
|
*/
|
||||||
void RegisterConsoleFunctions(std::unique_ptr<EQ::Net::ConsoleServer> &console)
|
void RegisterConsoleFunctions(std::unique_ptr<EQ::Net::ConsoleServer>& console)
|
||||||
{
|
{
|
||||||
console->RegisterLogin(std::bind(CheckLogin, std::placeholders::_1, std::placeholders::_2));
|
console->RegisterLogin(std::bind(CheckLogin, std::placeholders::_1, std::placeholders::_2));
|
||||||
console->RegisterCall(
|
console->RegisterCall("acceptmessages", 50, "acceptmessages [on/off]", std::bind(ConsoleAcceptMessages, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
"acceptmessages",
|
console->RegisterCall("api", 200, "api", std::bind(ConsoleApi, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
50,
|
console->RegisterCall("auction", 50, "auction [message]", std::bind(ConsoleAuction, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
"acceptmessages [on/off]",
|
console->RegisterCall("broadcast", 50, "broadcast [message]", std::bind(ConsoleBroadcast, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
std::bind(
|
console->RegisterCall("echo", 50, "echo [on/off]", std::bind(ConsoleNull, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
ConsoleAcceptMessages,
|
console->RegisterCall("emote", 50, "emote [zonename or charname or world] [type] [message]", std::bind(ConsoleEmote, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
std::placeholders::_1,
|
console->RegisterCall("flag", 200, "flag [status] [accountname]", std::bind(ConsoleFlag, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
std::placeholders::_2,
|
console->RegisterCall("gmsay", 50, "gmsay [message]", std::bind(ConsoleGMSay, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
std::placeholders::_3
|
console->RegisterCall("iplookup", 50, "IPLookup [name]", std::bind(ConsoleIpLookup, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
));
|
console->RegisterCall("kick", 150, "kick [charname]", std::bind(ConsoleKick, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
console->RegisterCall(
|
console->RegisterCall("lock", 150, "lock", std::bind(ConsoleLock, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
"api",
|
console->RegisterCall("lsreconnect", 50, "LSReconnect", std::bind(ConsoleNull, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
200,
|
console->RegisterCall("md5", 50, "md5", std::bind(ConsoleMd5, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
"api",
|
console->RegisterCall("ooc", 50, "ooc [message]", std::bind(ConsoleOOC, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
std::bind(ConsoleApi, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
console->RegisterCall("reloadworld", 200, "reloadworld", std::bind(ConsoleReloadWorld, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
console->RegisterCall(
|
console->RegisterCall("setpass", 200, "setpass [accountname] [newpass]", std::bind(ConsoleSetPass, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
"auction",
|
console->RegisterCall("signalcharbyname", 50, "signalcharbyname charname ID", std::bind(ConsoleSignalCharByName, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
50,
|
console->RegisterCall("tell", 50, "tell [name] [message]", std::bind(ConsoleTell, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
"auction [message]",
|
console->RegisterCall("unlock", 150, "unlock", std::bind(ConsoleUnlock, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
std::bind(
|
console->RegisterCall("uptime", 50, "uptime [zoneID#]", std::bind(ConsoleUptime, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
ConsoleAuction,
|
console->RegisterCall("version", 50, "version", std::bind(ConsoleVersion, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
std::placeholders::_1,
|
console->RegisterCall("who", 50, "who", std::bind(ConsoleWho, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
std::placeholders::_2,
|
console->RegisterCall("whoami", 50, "whoami", std::bind(ConsoleWhoami, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
std::placeholders::_3
|
console->RegisterCall("worldshutdown", 200, "worldshutdown", std::bind(ConsoleWorldShutdown, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
));
|
console->RegisterCall("zonebootup", 150, "zonebootup [ZoneServerID] [zonename]", std::bind(ConsoleZoneBootup, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
console->RegisterCall(
|
console->RegisterCall("zonelock", 150, "zonelock [list|lock|unlock] [zonename]", std::bind(ConsoleZoneLock, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
"broadcast",
|
console->RegisterCall("zoneshutdown", 150, "zoneshutdown [zonename or ZoneServerID]", std::bind(ConsoleZoneShutdown, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
50,
|
console->RegisterCall("zonestatus", 50, "zonestatus", std::bind(ConsoleZoneStatus, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));console->RegisterCall("ping", 50, "ping", std::bind(ConsoleNull, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
"broadcast [message]",
|
console->RegisterCall("quit", 50, "quit", std::bind(ConsoleQuit, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
std::bind(
|
console->RegisterCall("exit", 50, "exit", std::bind(ConsoleQuit, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
ConsoleBroadcast,
|
}
|
||||||
std::placeholders::_1,
|
|
||||||
std::placeholders::_2,
|
|
||||||
std::placeholders::_3
|
|
||||||
));
|
|
||||||
console->RegisterCall(
|
|
||||||
"echo",
|
|
||||||
50,
|
|
||||||
"echo [on/off]",
|
|
||||||
std::bind(ConsoleNull, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
|
||||||
console->RegisterCall(
|
|
||||||
"emote",
|
|
||||||
50,
|
|
||||||
"emote [zonename or charname or world] [type] [message]",
|
|
||||||
std::bind(ConsoleEmote, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
|
||||||
console->RegisterCall(
|
|
||||||
"flag",
|
|
||||||
200,
|
|
||||||
"flag [status] [accountname]",
|
|
||||||
std::bind(ConsoleFlag, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
|
||||||
console->RegisterCall(
|
|
||||||
"gmsay",
|
|
||||||
50,
|
|
||||||
"gmsay [message]",
|
|
||||||
std::bind(ConsoleGMSay, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
|
||||||
console->RegisterCall(
|
|
||||||
"iplookup",
|
|
||||||
50,
|
|
||||||
"IPLookup [name]",
|
|
||||||
std::bind(
|
|
||||||
ConsoleIpLookup,
|
|
||||||
std::placeholders::_1,
|
|
||||||
std::placeholders::_2,
|
|
||||||
std::placeholders::_3
|
|
||||||
));
|
|
||||||
console->RegisterCall(
|
|
||||||
"kick",
|
|
||||||
150,
|
|
||||||
"kick [charname]",
|
|
||||||
std::bind(ConsoleKick, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
|
||||||
console->RegisterCall(
|
|
||||||
"lock",
|
|
||||||
150,
|
|
||||||
"lock",
|
|
||||||
std::bind(ConsoleLock, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
|
||||||
console->RegisterCall(
|
|
||||||
"lsreconnect",
|
|
||||||
50,
|
|
||||||
"LSReconnect",
|
|
||||||
std::bind(ConsoleNull, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
|
||||||
console->RegisterCall(
|
|
||||||
"md5",
|
|
||||||
50,
|
|
||||||
"md5",
|
|
||||||
std::bind(ConsoleMd5, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
|
||||||
console->RegisterCall(
|
|
||||||
"ooc",
|
|
||||||
50,
|
|
||||||
"ooc [message]",
|
|
||||||
std::bind(ConsoleOOC, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
|
||||||
console->RegisterCall(
|
|
||||||
"reloadworld",
|
|
||||||
200,
|
|
||||||
"reloadworld",
|
|
||||||
std::bind(
|
|
||||||
ConsoleReloadWorld,
|
|
||||||
std::placeholders::_1,
|
|
||||||
std::placeholders::_2,
|
|
||||||
std::placeholders::_3
|
|
||||||
));
|
|
||||||
console->RegisterCall(
|
|
||||||
"setpass",
|
|
||||||
200,
|
|
||||||
"setpass [accountname] [newpass]",
|
|
||||||
std::bind(
|
|
||||||
ConsoleSetPass,
|
|
||||||
std::placeholders::_1,
|
|
||||||
std::placeholders::_2,
|
|
||||||
std::placeholders::_3
|
|
||||||
));
|
|
||||||
console->RegisterCall(
|
|
||||||
"signalcharbyname",
|
|
||||||
50,
|
|
||||||
"signalcharbyname charname ID",
|
|
||||||
std::bind(
|
|
||||||
ConsoleSignalCharByName,
|
|
||||||
std::placeholders::_1,
|
|
||||||
std::placeholders::_2,
|
|
||||||
std::placeholders::_3
|
|
||||||
));
|
|
||||||
console->RegisterCall(
|
|
||||||
"tell",
|
|
||||||
50,
|
|
||||||
"tell [name] [message]",
|
|
||||||
std::bind(ConsoleTell, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
|
||||||
console->RegisterCall(
|
|
||||||
"unlock",
|
|
||||||
150,
|
|
||||||
"unlock",
|
|
||||||
std::bind(
|
|
||||||
ConsoleUnlock,
|
|
||||||
std::placeholders::_1,
|
|
||||||
std::placeholders::_2,
|
|
||||||
std::placeholders::_3
|
|
||||||
));
|
|
||||||
console->RegisterCall(
|
|
||||||
"uptime",
|
|
||||||
50,
|
|
||||||
"uptime [zoneID#]",
|
|
||||||
std::bind(
|
|
||||||
ConsoleUptime,
|
|
||||||
std::placeholders::_1,
|
|
||||||
std::placeholders::_2,
|
|
||||||
std::placeholders::_3
|
|
||||||
));
|
|
||||||
console->RegisterCall(
|
|
||||||
"version",
|
|
||||||
50,
|
|
||||||
"version",
|
|
||||||
std::bind(
|
|
||||||
ConsoleVersion,
|
|
||||||
std::placeholders::_1,
|
|
||||||
std::placeholders::_2,
|
|
||||||
std::placeholders::_3
|
|
||||||
));
|
|
||||||
console->RegisterCall(
|
|
||||||
"who",
|
|
||||||
50,
|
|
||||||
"who",
|
|
||||||
std::bind(ConsoleWho, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
|
||||||
console->RegisterCall(
|
|
||||||
"whoami",
|
|
||||||
50,
|
|
||||||
"whoami",
|
|
||||||
std::bind(
|
|
||||||
ConsoleWhoami,
|
|
||||||
std::placeholders::_1,
|
|
||||||
std::placeholders::_2,
|
|
||||||
std::placeholders::_3
|
|
||||||
));
|
|
||||||
console->RegisterCall(
|
|
||||||
"worldshutdown",
|
|
||||||
200,
|
|
||||||
"worldshutdown",
|
|
||||||
std::bind(
|
|
||||||
ConsoleWorldShutdown,
|
|
||||||
std::placeholders::_1,
|
|
||||||
std::placeholders::_2,
|
|
||||||
std::placeholders::_3
|
|
||||||
));
|
|
||||||
console->RegisterCall(
|
|
||||||
"zonebootup",
|
|
||||||
150,
|
|
||||||
"zonebootup [ZoneServerID] [zonename]",
|
|
||||||
std::bind(
|
|
||||||
ConsoleZoneBootup,
|
|
||||||
std::placeholders::_1,
|
|
||||||
std::placeholders::_2,
|
|
||||||
std::placeholders::_3
|
|
||||||
));
|
|
||||||
console->RegisterCall(
|
|
||||||
"zonelock",
|
|
||||||
150,
|
|
||||||
"zonelock [list|lock|unlock] [zonename]",
|
|
||||||
std::bind(
|
|
||||||
ConsoleZoneLock,
|
|
||||||
std::placeholders::_1,
|
|
||||||
std::placeholders::_2,
|
|
||||||
std::placeholders::_3
|
|
||||||
));
|
|
||||||
console->RegisterCall(
|
|
||||||
"zoneshutdown",
|
|
||||||
150,
|
|
||||||
"zoneshutdown [zonename or ZoneServerID]",
|
|
||||||
std::bind(
|
|
||||||
ConsoleZoneShutdown,
|
|
||||||
std::placeholders::_1,
|
|
||||||
std::placeholders::_2,
|
|
||||||
std::placeholders::_3
|
|
||||||
));
|
|
||||||
console->RegisterCall(
|
|
||||||
"zonestatus",
|
|
||||||
50,
|
|
||||||
"zonestatus",
|
|
||||||
std::bind(
|
|
||||||
ConsoleZoneStatus,
|
|
||||||
std::placeholders::_1,
|
|
||||||
std::placeholders::_2,
|
|
||||||
std::placeholders::_3
|
|
||||||
));
|
|
||||||
console->RegisterCall(
|
|
||||||
"ping",
|
|
||||||
50,
|
|
||||||
"ping",
|
|
||||||
std::bind(ConsoleNull, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
|
||||||
console->RegisterCall(
|
|
||||||
"quit",
|
|
||||||
50,
|
|
||||||
"quit",
|
|
||||||
std::bind(ConsoleQuit, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
|
||||||
console->RegisterCall(
|
|
||||||
"exit",
|
|
||||||
50,
|
|
||||||
"exit",
|
|
||||||
std::bind(ConsoleQuit, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user