]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/server.h
Inventory: Make addList() consistent (#11382)
[dragonfireclient.git] / src / server.h
index 7071d2d077f9e91e9454292da5a57102f32b230a..9857215d09e98664772058ecfd51596b42672f91 100644 (file)
@@ -219,7 +219,7 @@ class Server : public con::PeerHandler, public MapEventReceiver,
        void onMapEditEvent(const MapEditEvent &event);
 
        // Connection must be locked when called
-       std::wstring getStatusString();
+       std::string getStatusString();
        inline double getUptime() const { return m_uptime_counter->get(); }
 
        // read shutdown state
@@ -257,7 +257,7 @@ class Server : public con::PeerHandler, public MapEventReceiver,
 
        void deleteParticleSpawner(const std::string &playername, u32 id);
 
-       bool dynamicAddMedia(const std::string &filepath);
+       bool dynamicAddMedia(const std::string &filepath, std::vector<RemotePlayer*> &sent_to);
 
        ServerInventoryManager *getInventoryMgr() const { return m_inventory_mgr.get(); }
        void sendDetachedInventory(Inventory *inventory, const std::string &name, session_t peer_id);
@@ -495,10 +495,8 @@ class Server : public con::PeerHandler, public MapEventReceiver,
        void handleChatInterfaceEvent(ChatEvent *evt);
 
        // This returns the answer to the sender of wmessage, or "" if there is none
-       std::wstring handleChat(const std::string &name, const std::wstring &wname,
-               std::wstring wmessage_input,
-               bool check_shout_priv = false,
-               RemotePlayer *player = NULL);
+       std::wstring handleChat(const std::string &name, std::wstring wmessage_input,
+               bool check_shout_priv = false, RemotePlayer *player = nullptr);
        void handleAdminChat(const ChatEventChat *evt);
 
        // When called, connection mutex should be locked
@@ -549,6 +547,10 @@ class Server : public con::PeerHandler, public MapEventReceiver,
        // Environment
        ServerEnvironment *m_env = nullptr;
 
+       // Reference to the server map until ServerEnvironment is initialized
+       // after that this variable must be a nullptr
+       ServerMap *m_startup_server_map = nullptr;
+
        // server connection
        std::shared_ptr<con::Connection> m_con;