X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fmodchannels.h;h=735609b59e91615032454516300616b21c62282d;hb=cad5b987ad4720bd6a49d3604be9e81ea348f799;hp=5f1aa884e011aeb236b416fcec570a6a728ecb2a;hpb=6f1c90720402415b62fb4d5e809ec7dbc1cd7f96;p=minetest.git diff --git a/src/modchannels.h b/src/modchannels.h index 5f1aa884e..735609b59 100644 --- a/src/modchannels.h +++ b/src/modchannels.h @@ -23,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include #include #include +#include "network/networkprotocol.h" #include "irrlichttypes.h" enum ModChannelState : u8 @@ -40,8 +41,8 @@ class ModChannel ~ModChannel() = default; const std::string &getName() const { return m_name; } - bool registerConsumer(u16 peer_id); - bool removeConsumer(u16 peer_id); + bool registerConsumer(session_t peer_id); + bool removeConsumer(session_t peer_id); const std::vector &getChannelPeers() const { return m_client_consumers; } bool canWrite() const; void setState(ModChannelState state); @@ -70,8 +71,8 @@ class ModChannelMgr void registerChannel(const std::string &channel); bool setChannelState(const std::string &channel, ModChannelState state); - bool joinChannel(const std::string &channel, u16 peer_id); - bool leaveChannel(const std::string &channel, u16 peer_id); + bool joinChannel(const std::string &channel, session_t peer_id); + bool leaveChannel(const std::string &channel, session_t peer_id); bool channelRegistered(const std::string &channel) const; ModChannel *getModChannel(const std::string &channel); /** @@ -81,7 +82,7 @@ class ModChannelMgr * @return true if write is allowed */ bool canWriteOnChannel(const std::string &channel) const; - void leaveAllChannels(u16 peer_id); + void leaveAllChannels(session_t peer_id); const std::vector &getChannelPeers(const std::string &channel) const; private: