mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Improved server commands and added player permissions.
--HG-- extra : rebase_source : 178fe08f10b7de3ebaba088bd24faad795114216
This commit is contained in:
23
src/server.h
23
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
|
||||
|
Reference in New Issue
Block a user