mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-12-22 12:00:03 +00:00
Validate arguments to /level and /summonW; fix retreatStep() bug.
This commit is contained in:
@@ -61,6 +61,11 @@ void populationCommand(std::string full, std::vector<std::string>& args, CNSocke
|
||||
}
|
||||
|
||||
void levelCommand(std::string full, std::vector<std::string>& args, CNSocket* sock) {
|
||||
if (args.size() < 2) {
|
||||
ChatManager::sendServerMessage(sock, "/level: no level specified");
|
||||
return;
|
||||
}
|
||||
|
||||
Player *plr = PlayerManager::getPlayer(sock);
|
||||
if (plr == nullptr)
|
||||
return;
|
||||
@@ -189,6 +194,10 @@ void mssCommand(std::string full, std::vector<std::string>& args, CNSocket* sock
|
||||
}
|
||||
|
||||
void summonWCommand(std::string full, std::vector<std::string>& args, CNSocket* sock) {
|
||||
if (args.size() < 2) {
|
||||
ChatManager::sendServerMessage(sock, "/level: no mob type specified");
|
||||
return;
|
||||
}
|
||||
Player* plr = PlayerManager::getPlayer(sock);
|
||||
|
||||
char *rest;
|
||||
|
||||
Reference in New Issue
Block a user