From 34b3c13404c466c8f64d198dce914a1e3fa094c2 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Fri, 15 Feb 2013 13:00:59 +0000 Subject: Plugins can now bind console commands FS #300 Most console commands are now implemented in the Core plugin. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1214 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Root.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'source/Root.h') diff --git a/source/Root.h b/source/Root.h index 7cc33d6c1..d3a06354f 100644 --- a/source/Root.h +++ b/source/Root.h @@ -62,18 +62,22 @@ public: cPluginManager * GetPluginManager (void) { return m_PluginManager; } // tolua_export cAuthenticator & GetAuthenticator (void) { return m_Authenticator; } - void ServerCommand(const AString & a_Cmd); // tolua_export + /// Executes a console command through the cServer class; does special handling for "stop" and "restart". + void ExecuteConsoleCommand(const AString & a_Cmd); // tolua_export - void KickUser(int a_ClientID, const AString & a_Reason); // Kicks the user, no matter in what world they are. Used from cAuthenticator - void AuthenticateUser(int a_ClientID); // Called by cAuthenticator to auth the specified user + /// Kicks the user, no matter in what world they are. Used from cAuthenticator + void KickUser(int a_ClientID, const AString & a_Reason); + + /// Called by cAuthenticator to auth the specified user + void AuthenticateUser(int a_ClientID); - void TickWorlds( float a_Dt ); + void TickWorlds(float a_Dt); /// Returns the number of chunks loaded int GetTotalChunkCount(void); // tolua_export /// Saves all chunks in all worlds - void SaveAllChunks(void); + void SaveAllChunks(void); // tolua_export /// Calls the callback for each player in all worlds bool ForEachPlayer(cPlayerListCallback & a_Callback); // >> EXPORTED IN MANUALBINDINGS << @@ -81,6 +85,9 @@ public: /// Finds a player from a partial or complete player name and calls the callback - case-insensitive bool FindAndDoWithPlayer(const AString & a_PlayerName, cPlayerListCallback & a_Callback); // >> EXPORTED IN MANUALBINDINGS << + /// Returns the textual description of the protocol version: 49 -> "1.4.4". Provided specifically for Lua API + static AString GetProtocolVersionTextFromInt(int a_ProtocolVersionNum); // tolua_export + private: void LoadGlobalSettings(); -- cgit v1.2.3