117 DLLEXPORT virtual bool RegisterCustomCommandHandler(
118 std::shared_ptr<CustomCommandHandler> handler);
124 DLLEXPORT virtual bool IsThisDefaultCommand(
const std::string &firstword)
const;
158 #ifdef LEAK_INTO_GLOBAL virtual DLLEXPORT void EndOwnership(CommandHandler *which)
Marks the end of ownership, it is no longer required to report that this object is released...
virtual DLLEXPORT void StartOwnership(CommandHandler *commander)
Marks the start of a time period during which this object needs to report if it is released...
COMMANDSENDER_PERMISSIONMODE
virtual DLLEXPORT void _OnReleaseParentCommanders()
Call when releasing, this is only required if StartOwnership and EndOwnership aren't overloaded...
virtual DLLEXPORT const std::string & GetUniqueName()=0
Returns the unique name of this entity, this can be something like a steam id or some other static na...
std::list< CommandHandler * > CommandHandlersToNotify
static CommandHandler * Staticaccess
A static access member for command executing functions.
NetworkServerInterface * Owner
Pointer to the owning interface for fetching various other things.
virtual DLLEXPORT void SendPrivateMessage(const std::string &message)
This should send a message to this entity for them to see what happened when they executed a command...
Represents an entity that can execute commands.
virtual DLLEXPORT COMMANDSENDER_PERMISSIONMODE GetPermissionMode()=0
Returns the permissions model used by this object.
std::vector< std::shared_ptr< CustomCommandHandler > > CustomHandlers
All the custom command providers.
std::list< CommandSender * > SendersInUse
Holds all the command dispatchers who are currently executing commands.
Class that encapsulates common networking functionality required by server programs.
The access mask controls which registered functions and classes a script sees.
virtual DLLEXPORT bool _OnSendPrivateMessage(const std::string &message)=0
Should be the actual implementation of SendPrivateMessage.
virtual DLLEXPORT const std::string & GetNickname()=0
Returns a friendly name, nickname used to represent this entity.
Handles all commands sent by the players on the server.