diff options
author | Ciaran Gultnieks <ciaran@ciarang.com> | 2011-05-16 10:41:19 +0100 |
---|---|---|
committer | Ciaran Gultnieks <ciaran@ciarang.com> | 2011-05-16 10:41:19 +0100 |
commit | 248d7c8469f8cb37406ea0ce56d0945e38334cfb (patch) | |
tree | df8c2ad03a674f8d7c08d6af01ddb3f2a7e7b689 /src/server.h | |
parent | dadac0e79f96b112947a50f37b39ad9677e870d0 (diff) | |
download | minetest-248d7c8469f8cb37406ea0ce56d0945e38334cfb.tar.gz minetest-248d7c8469f8cb37406ea0ce56d0945e38334cfb.tar.bz2 minetest-248d7c8469f8cb37406ea0ce56d0945e38334cfb.zip |
Improved server commands and added player permissions.
--HG--
extra : rebase_source : 178fe08f10b7de3ebaba088bd24faad795114216
Diffstat (limited to 'src/server.h')
-rw-r--r-- | src/server.h | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/src/server.h b/src/server.h index 4603f98ed..d8b47aef9 100644 --- a/src/server.h +++ b/src/server.h @@ -387,6 +387,12 @@ public: return time_to_daynight_ratio(m_time_of_day.get()); } + void setTimeOfDay(u32 time) + { + m_time_of_day.set(time); + m_time_of_day_send_timer = 0; + } + bool getShutdownRequested() { return m_shutdown_requested.get(); @@ -405,6 +411,19 @@ public: Inventory* getInventory(InventoryContext *c, std::string id); void inventoryModified(InventoryContext *c, std::string id); + // Connection must be locked when called + std::wstring getStatusString(); + + void requestShutdown(void) + { + m_shutdown_requested.set(true); + } + + + // Envlock and conlock should be locked when calling this + void SendMovePlayer(Player *player); + + private: // Virtual methods from con::PeerHandler. @@ -429,7 +448,6 @@ private: void SendChatMessage(u16 peer_id, const std::wstring &message); void BroadcastChatMessage(const std::wstring &message); void SendPlayerHP(Player *player); - void SendMovePlayer(Player *player); /* Send a node removal/addition event to all clients except ignore_id. Additionally, if far_players!=NULL, players further away than @@ -455,9 +473,6 @@ private: // When called, connection mutex should be locked RemoteClient* getClient(u16 peer_id); - // Connection must be locked when called - std::wstring getStatusString(); - /* Get a player from memory or creates one. If player is already connected, return NULL |