mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-25 23:17:28 +00:00
remove broken delimiter
This commit is contained in:
parent
6c2f113604
commit
29279899b7
@ -1006,13 +1006,12 @@ namespace GMZeroCommands {
|
|||||||
void Help(Entity* entity, const SystemAddress& sysAddr, const std::string args) {
|
void Help(Entity* entity, const SystemAddress& sysAddr, const std::string args) {
|
||||||
std::ostringstream feedback;
|
std::ostringstream feedback;
|
||||||
if (args.empty()) {
|
if (args.empty()) {
|
||||||
feedback << "----- Commands -----\n";
|
feedback << "----- Commands -----";
|
||||||
for (size_t i = 0; i < CommandInfos.size(); i++) {
|
for (const auto& command : CommandInfos) {
|
||||||
const auto& command = CommandInfos[i];
|
|
||||||
// TODO: Limit displaying commands based on GM level they require
|
// TODO: Limit displaying commands based on GM level they require
|
||||||
if (command.requiredLevel > entity->GetGMLevel()) continue;
|
if (command.requiredLevel > entity->GetGMLevel()) continue;
|
||||||
if (i > 0) feedback << '\n';
|
LOG("Help command: %s", command.aliases[0].c_str());
|
||||||
feedback << "/" << command.aliases[0] << ": *" << command.help << '*';
|
feedback << "\n/" << command.aliases[0] << ": " << command.help;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
bool foundCommand = false;
|
bool foundCommand = false;
|
||||||
@ -1023,7 +1022,7 @@ namespace GMZeroCommands {
|
|||||||
foundCommand = true;
|
foundCommand = true;
|
||||||
feedback << "----- " << command.aliases.at(0) << " -----\n";
|
feedback << "----- " << command.aliases.at(0) << " -----\n";
|
||||||
// info can be a localizable string
|
// info can be a localizable string
|
||||||
feedback << '*' << command.info << "*";
|
feedback << command.info;
|
||||||
if (command.aliases.size() == 1) break;
|
if (command.aliases.size() == 1) break;
|
||||||
|
|
||||||
feedback << "\nAliases: ";
|
feedback << "\nAliases: ";
|
||||||
@ -1036,7 +1035,8 @@ namespace GMZeroCommands {
|
|||||||
// Let GameMasters know if the command doesn't exist
|
// Let GameMasters know if the command doesn't exist
|
||||||
if (!foundCommand && entity->GetGMLevel() > eGameMasterLevel::CIVILIAN) feedback << "Command " << std::quoted(args) << " does not exist!";
|
if (!foundCommand && entity->GetGMLevel() > eGameMasterLevel::CIVILIAN) feedback << "Command " << std::quoted(args) << " does not exist!";
|
||||||
}
|
}
|
||||||
GameMessages::SendSlashCommandFeedbackText(entity, GeneralUtils::ASCIIToUTF16(feedback.str()));
|
const auto feedbackStr = feedback.str();
|
||||||
|
if (!feedbackStr.empty()) GameMessages::SendSlashCommandFeedbackText(entity, GeneralUtils::ASCIIToUTF16(feedbackStr));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Pvp(Entity* entity, const SystemAddress& sysAddr, const std::string args) {
|
void Pvp(Entity* entity, const SystemAddress& sysAddr, const std::string args) {
|
||||||
|
Loading…
Reference in New Issue
Block a user