DarkflameServer/dGame/dUtilities/SlashCommandHandler.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
1.1 KiB
C
Raw Normal View History

/*
* Darkflame Universe
* Copyright 2018
*/
#ifndef SLASHCOMMANDHANDLER_H
#define SLASHCOMMANDHANDLER_H
#include "RakNetTypes.h"
2024-03-25 12:10:22 +00:00
#include "eGameMasterLevel.h"
#include <string>
class Entity;
2024-03-25 12:10:22 +00:00
struct Command {
std::string description = "Default Command Description";
std::string help = "Default Command Help Text";
eGameMasterLevel requiredLevel = eGameMasterLevel::DEVELOPER;
std::function<void(Entity*,const std::string)> handle;
};
namespace SlashCommandHandler {
2024-03-25 12:10:22 +00:00
void Startup();
void HandleChatCommand(const std::u16string& command, Entity* entity, const SystemAddress& sysAddr);
void SendAnnouncement(const std::string& title, const std::string& message);
2024-03-25 12:10:22 +00:00
void RegisterCommand(Command info, std::string command);
};
2024-03-25 12:10:22 +00:00
namespace DEVGMCommands {
void SetGMLevel(Entity* entity, const std::string args);
void ToggleNameplate(Entity* entity, const std::string args);
void ToggleSkipCinematics(Entity* entity, const std::string args);
}
namespace GMZeroCommands {
void Help(Entity* entity, const std::string args);
}
namespace GreaterThanZeroCommands {
}
#endif // SLASHCOMMANDHANDLER_H