mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Improved server commands and added player permissions.
--HG-- extra : rebase_source : 178fe08f10b7de3ebaba088bd24faad795114216
This commit is contained in:
parent
dadac0e79f
commit
248d7c8469
8 changed files with 454 additions and 70 deletions
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue