32#include <unordered_set>
35#include <shared_mutex>
36#include <condition_variable>
99 std::string_view sha1_digest_ =
""):
159 std::unordered_map<std::string, std::unique_ptr<PackedValue>>
map;
174 const std::string &path_world,
176 bool simple_singleplayer_mode,
180 std::string *shutdown_errmsg =
nullptr
192 void AsyncRunStep(
float dtime,
bool initial_step =
false);
260 void requestShutdown(
const std::string &msg,
bool reconnect,
float delay = 0.0f);
270 bool checkPriv(
const std::string &name,
const std::string &priv);
275 void setIpBanned(
const std::string &ip,
const std::string &name);
280 void notifyPlayer(
const char *name,
const std::wstring &msg);
294 std::optional<std::string_view>
data;
310 std::list<std::string> *log);
327 virtual const std::vector<ModSpec> &
getMods()
const;
356 bool showFormspec(
const char *name,
const std::string &formspec,
const std::string &formname);
392 std::string_view custom_reason =
"",
bool reconnect =
false);
394 const std::string &str_reason,
bool reconnect);
413 std::vector<MinimapMode> &modes,
431 std::unordered_map<std::string, std::string>
getMediaList();
436 const std::string &world_path,
const Settings &world_mt);
490 void trigger(
float delay,
const std::string &msg,
bool reconnect);
507 return std::hash<v3s16>()(
p.first) ^
p.second;
519 std::string_view custom_reason,
bool reconnect =
false);
522 u16 protocol_version);
529 f32 animation_speed);
535 const std::string &formname);
549 const std::string &message,
session_t from_peer);
558 float far_d_nodes = 100);
560 std::unordered_set<u16> *far_players =
nullptr,
561 float far_d_nodes = 100,
bool remove_metadata =
true);
563 v3f p,
float far_d_nodes, std::unordered_set<u16> *far_players);
566 float far_d_nodes = 100);
576 bool addMediaFile(
const std::string &filename,
const std::string &filepath,
577 std::string *filedata =
nullptr, std::string *digest =
nullptr);
581 const std::unordered_set<std::string> &tosend);
596 bool reliable =
true);
611 std::wstring
handleChat(
const std::string &name, std::wstring wmessage_input,
612 bool check_shout_priv =
false,
RemotePlayer *player =
nullptr);
671 std::shared_ptr<con::IConnection>
m_con;
747 std::unordered_map<std::string, MediaInfo>
m_media;
virtual const char * what() const noexcept
Definition exceptions.h:17
Definition chat_interface.h:19
Definition clientiface.h:443
Definition emerge_internal.h:25
Definition craftdef.h:390
Definition rollback_interface.h:97
Definition craftdef.h:419
Definition inventory.h:314
virtual double get() const =0
Definition modchannels.h:52
Definition modchannels.h:23
Definition exceptions.h:85
void set(const T &value)
Definition thread.h:28
Definition networkpacket.h:14
This class is for getting the actual properties of nodes from their content ID.
Definition nodedef.h:541
Definition player_sao.h:56
Definition clientiface.h:214
Definition remoteplayer.h:26
Definition serveractiveobject.h:41
Definition serverenvironment.h:219
Map & getMap()
Definition serverenvironment.cpp:578
Definition serverinventorymgr.h:17
Manages server mods.
Definition mods.h:18
Definition scripting_server.h:33
std::lock_guard< ordered_mutex > m_lock
Definition server.h:461
EnvAutoLock(Server *server)
Definition server.h:458
void kickAllPlayers(AccessDeniedCode reason, const std::string &str_reason, bool reconnect)
Definition server.cpp:2880
void setIpBanned(const std::string &ip, const std::string &name)
Definition server.cpp:3264
void sendMetadataChanged(const std::unordered_set< v3s16 > &positions, float far_d_nodes=100)
Definition server.cpp:2345
PlayerSAO * emergePlayer(const char *name, session_t peer_id, u16 proto_version)
Definition server.cpp:3973
void DisconnectPeer(session_t peer_id)
Definition server.cpp:2889
IRollbackManager * m_rollback
Definition server.h:677
void stop()
Definition server.cpp:597
void handleCommand_FirstSrp(NetworkPacket *pkt)
Definition serverpackethandler.cpp:1451
float m_liquid_transform_timer
Definition server.h:659
void setStars(RemotePlayer *player, const StarParams ¶ms)
Definition server.cpp:3479
void setSun(RemotePlayer *player, const SunParams ¶ms)
Definition server.cpp:3465
RemoteClient * getClientNoEx(session_t peer_id, ClientState state_min=CS_Active)
Definition server.cpp:3152
Translations * getTranslationLanguage(const std::string &lang_code)
Definition server.cpp:4152
void handleCommand_PlayerItem(NetworkPacket *pkt)
Definition serverpackethandler.cpp:815
std::unordered_map< session_t, std::string > m_formspec_state_data
Definition server.h:709
void SendPlayerFormspecPrepend(session_t peer_id)
Definition server.cpp:2045
bool rollbackRevertActions(const std::list< RollbackAction > &actions, std::list< std::string > *log)
Definition server.cpp:3759
std::string m_admin_nick
Definition server.h:718
void init()
Definition server.cpp:430
u16 m_max_chatmessage_length
Definition server.h:647
void requestShutdown(const std::string &msg, bool reconnect, float delay=0.0f)
Definition server.cpp:3941
void setStepSettings(StepSettings spdata)
Definition server.h:343
void SendShowFormspecMessage(session_t peer_id, const std::string &formspec, const std::string &formname)
Definition server.cpp:1551
void SendPlayerSpeed(session_t peer_id, const v3f &added_vel)
Definition server.cpp:2158
Address getPeerAddress(session_t peer_id)
Definition server.cpp:3431
void overrideDayNightRatio(RemotePlayer *player, bool do_override, float brightness)
Definition server.cpp:3493
void SendPlayerInventoryFormspec(session_t peer_id)
Definition server.cpp:2033
void HandlePlayerDeath(PlayerSAO *sao, const PlayerHPChangeReason &reason)
Definition server.cpp:2853
static u16 getProtocolVersionMax()
Definition server.cpp:4310
void SendMovePlayer(PlayerSAO *sao)
Definition server.cpp:1947
void DenySudoAccess(session_t peer_id)
Definition server.cpp:2865
void SendPlayerBreath(PlayerSAO *sao)
Definition server.cpp:1939
void SendAccessDenied(session_t peer_id, AccessDeniedCode reason, std::string_view custom_reason, bool reconnect=false)
Definition server.cpp:1449
IWritableCraftDefManager * m_craftdef
Definition server.h:689
ModStorageDatabase * m_mod_storage_database
Definition server.h:760
const ClientDynamicInfo * getClientDynamicInfo(session_t peer_id)
Definition server.cpp:1366
void spawnParticle(const std::string &playername, const ParticleParameters &p)
Definition server.cpp:3513
void step()
Definition server.cpp:608
virtual IItemDefManager * getItemDefManager()
Definition server.cpp:3803
MutexedVariable< std::string > m_async_fatal_error
Definition server.h:655
static ModStorageDatabase * openModStorageDatabase(const std::string &world_path)
Definition server.cpp:4189
void SendSetSky(session_t peer_id, const SkyboxParams ¶ms)
Definition server.cpp:1822
void SendHUDChange(session_t peer_id, u32 id, HudElementStat stat, void *value)
Definition server.cpp:1775
std::unordered_map< std::string, MediaInfo > m_media
Definition server.h:747
void SendHP(session_t peer_id, u16 hp, bool effect)
Definition server.cpp:1435
void SendDeleteParticleSpawner(session_t peer_id, u32 id)
Definition server.cpp:1743
u64 m_csm_restriction_flags
Definition server.h:764
bool checkInteractDistance(RemotePlayer *player, const f32 d, const std::string &what)
Definition serverpackethandler.cpp:856
void reportPrivsModified(const std::string &name="")
Definition server.cpp:3226
void sendDetachedInventory(Inventory *inventory, const std::string &name, session_t peer_id)
Definition server.cpp:2808
void handleCommand_Null(NetworkPacket *pkt)
Definition server.h:206
void handleCommand_SrpBytesA(NetworkPacket *pkt)
Definition serverpackethandler.cpp:1540
void fadeSound(s32 handle, float step, float gain)
Definition server.cpp:2271
std::queue< MapEditEvent * > m_unsent_map_edit_queue
Definition server.h:737
void hudSetHotbarSelectedImage(RemotePlayer *player, const std::string &name)
Definition server.cpp:3419
void printToConsoleOnly(const std::string &text)
Definition server.cpp:1377
void setTimeOfDay(u32 time)
Definition server.cpp:1306
void DeleteClient(session_t peer_id, ClientDeletionReason reason)
Definition server.cpp:2920
void ProcessData(NetworkPacket *pkt)
Definition server.cpp:1246
bool denyIfBanned(session_t peer_id)
Definition server.cpp:3284
void setAsyncFatalError(const std::string &error)
Definition server.h:346
s32 playSound(ServerPlayingSound ¶ms, bool ephemeral=false)
Definition server.cpp:2182
BanManager * m_banmanager
Definition server.h:674
void setSky(RemotePlayer *player, const SkyboxParams ¶ms)
Definition server.cpp:3458
bool m_dedicated
Definition server.h:649
void SendSpawnParticle(session_t peer_id, u16 protocol_version, const ParticleParameters &p)
Definition server.cpp:1576
DISABLE_CLASS_COPY(Server)
bool addMediaFile(const std::string &filename, const std::string &filepath, std::string *filedata=nullptr, std::string *digest=nullptr)
Definition server.cpp:2513
ModChannel * getModChannel(const std::string &channel)
Definition server.cpp:4112
void sendNodeChangePkt(NetworkPacket &pkt, v3s16 block_pos, v3f p, float far_d_nodes, std::unordered_set< u16 > *far_players)
Definition server.cpp:2316
virtual ModIPCStore * getModIPCStore()
Definition server.h:333
void handleCommand_InventoryAction(NetworkPacket *pkt)
Definition serverpackethandler.cpp:569
std::unique_ptr< EmergeManager > m_emerge
Definition server.h:680
void handleCommand_Interact(NetworkPacket *pkt)
Definition serverpackethandler.cpp:884
void SendMovePlayerRel(session_t peer_id, const v3f &added_pos)
Definition server.cpp:1967
virtual ICraftDefManager * getCraftDefManager()
Definition server.cpp:3813
v3f findSpawnPos()
Definition server.cpp:3870
VoxelArea m_ignore_map_edit_events_area
Definition server.h:744
std::set< std::string > getPlayerEffectivePrivs(const std::string &name)
Definition server.cpp:3213
s32 nextSoundId()
Definition server.cpp:2165
bool SendBlock(session_t peer_id, const v3s16 &blockpos)
Definition server.cpp:2497
virtual const ModSpec * getModSpec(const std::string &modname) const
Definition server.cpp:3843
IntervalLimiter m_map_timer_and_unload_interval
Definition server.h:664
void handleCommand_PlayerPos(NetworkPacket *pkt)
Definition serverpackethandler.cpp:508
void SendHUDSetFlags(session_t peer_id, u32 flags, u32 mask)
Definition server.cpp:1806
~Server()
Definition server.cpp:333
std::unique_ptr< ServerModManager > m_modmgr
Definition server.h:472
ServerEnvironment & getEnv()
Definition server.h:358
void sendDetachedInventories(session_t peer_id, bool incremental)
Definition server.cpp:2834
std::unordered_map< std::string, std::string > getMediaList()
Definition server.cpp:4176
PlayerSAO * getPlayerSAO(session_t peer_id)
Definition server.cpp:3165
void handleCommand(NetworkPacket *pkt)
Definition server.cpp:1240
void SendPlayerPrivileges(session_t peer_id)
Definition server.cpp:2014
std::wstring handleChat(const std::string &name, std::wstring wmessage_input, bool check_shout_priv=false, RemotePlayer *player=nullptr)
Definition server.cpp:3042
MetricGaugePtr m_lag_gauge
Definition server.h:780
void notifyPlayer(const char *name, const std::wstring &msg)
Definition server.cpp:3300
void setMoon(RemotePlayer *player, const MoonParams ¶ms)
Definition server.cpp:3472
ClientInterface m_clients
Definition server.h:707
void stopSound(s32 handle)
Definition server.cpp:2252
float m_time_of_day_send_timer
Definition server.h:658
void handleCommand_SrpBytesM(NetworkPacket *pkt)
Definition serverpackethandler.cpp:1647
void handleCommand_InventoryFields(NetworkPacket *pkt)
Definition serverpackethandler.cpp:1388
bool getClientConInfo(session_t peer_id, con::rtt_stat_type type, float *retval)
Definition server.cpp:1336
virtual const SubgameSpec * getGameSpec() const
Definition server.h:329
MetricGaugePtr m_player_gauge
Definition server.h:778
void addShutdownError(const ModError &e)
Definition server.cpp:3854
float m_mod_storage_save_timer
Definition server.h:761
void SendOverrideDayNightRatio(session_t peer_id, bool do_override, float ratio)
Definition server.cpp:1893
bool sendModChannelMessage(const std::string &channel, const std::string &message)
Definition server.cpp:4103
std::string getBanDescription(const std::string &ip_or_name)
Definition server.cpp:3279
std::unordered_map< s32, ServerPlayingSound > m_playing_sounds
Definition server.h:756
virtual const NodeDefManager * getNodeDefManager()
Definition server.cpp:3808
virtual std::string getModDataPath() const
Definition server.h:332
void onMapEditEvent(const MapEditEvent &event)
Definition server.cpp:1312
MetricCounterPtr m_packet_recv_processed_counter
Definition server.h:783
float m_masterserver_timer
Definition server.h:661
void SendSetSun(session_t peer_id, const SunParams ¶ms)
Definition server.cpp:1856
void setLighting(RemotePlayer *player, const Lighting &lighting)
Definition server.cpp:3501
void SendSetMoon(session_t peer_id, const MoonParams ¶ms)
Definition server.cpp:1865
void UpdateCrafting(RemotePlayer *player)
Definition server.cpp:2998
bool checkPriv(const std::string &name, const std::string &priv)
Definition server.cpp:3220
void handleCommand_HaveMedia(NetworkPacket *pkt)
Definition serverpackethandler.cpp:1811
bool leaveModChannel(const std::string &channel)
Definition server.cpp:4098
NodeDefManager * getWritableNodeDefManager()
Definition server.cpp:3828
ShutdownState m_shutdown_state
Definition server.h:715
std::atomic< StepSettings > m_step_settings
Definition server.h:699
MetricCounterPtr m_uptime_counter
Definition server.h:777
IWritableItemDefManager * getWritableItemDefManager()
Definition server.cpp:3823
void handleCommand_ModChannelLeave(NetworkPacket *pkt)
Definition serverpackethandler.cpp:1758
void handleCommand_ClientReady(NetworkPacket *pkt)
Definition serverpackethandler.cpp:363
void SendPlayerHP(PlayerSAO *sao, bool effect)
Definition server.cpp:1430
void handleAdminChat(const ChatEventChat *evt)
Definition server.cpp:3131
void SendItemDef(session_t peer_id, IItemDefManager *itemdef, u16 protocol_version)
Definition server.cpp:1459
RemoteClient * getClient(session_t peer_id, ClientState state_min=CS_Active)
Definition server.cpp:3144
void SendSetLighting(session_t peer_id, const Lighting &lighting)
Definition server.cpp:1904
IRollbackManager * getRollbackManager()
Definition server.h:318
void SendInventory(RemotePlayer *player, bool incremental)
Definition server.cpp:1510
bool hudSetFlags(RemotePlayer *player, u32 flags, u32 mask)
Definition server.cpp:3368
std::vector< std::pair< std::string, std::string > > m_mapgen_init_files
Definition server.h:447
float m_step_pending_dyn_media_timer
Definition server.h:751
void start()
Definition server.cpp:557
MetricCounterPtr m_aom_buffer_counter[2]
Definition server.h:781
MetricCounterPtr m_packet_recv_counter
Definition server.h:782
IWritableCraftDefManager * getWritableCraftDefManager()
Definition server.cpp:3833
void SendHUDAdd(session_t peer_id, u32 id, HudElement *form)
Definition server.cpp:1756
std::unique_ptr< ModChannelMgr > m_modchannel_mgr
Definition server.h:768
bool isShutdownRequested() const
Definition server.h:257
std::unique_ptr< ServerInventoryManager > m_inventory_mgr
Definition server.h:771
void deletingPeer(con::IPeer *peer, bool timeout)
Definition server.cpp:1327
virtual const std::vector< ModSpec > & getMods() const
Definition server.cpp:3838
void sendRemoveNode(v3s16 p, std::unordered_set< u16 > *far_players=nullptr, float far_d_nodes=100)
Definition server.cpp:2292
void SendCloudParams(session_t peer_id, const CloudParams ¶ms)
Definition server.cpp:1885
virtual u16 allocateUnknownNodeId(const std::string &name)
Definition server.cpp:3818
bool showFormspec(const char *name, const std::string &formspec, const std::string &formname)
Definition server.cpp:3317
bool hudRemove(RemotePlayer *player, u32 id)
Definition server.cpp:3344
void SendHUDSetParam(session_t peer_id, u16 param, std::string_view value)
Definition server.cpp:1815
ordered_mutex m_env_mutex
Definition server.h:637
void broadcastModChannelMessage(const std::string &channel, const std::string &message, session_t from_peer)
Definition server.cpp:4117
void unsetIpBanned(const std::string &ip_or_name)
Definition server.cpp:3274
std::unique_ptr< ServerScripting > m_script
Definition server.h:469
void sendRequestedMedia(session_t peer_id, const std::unordered_set< std::string > &tosend)
Definition server.cpp:2667
u32 hudAdd(RemotePlayer *player, HudElement *element)
Definition server.cpp:3332
MetricCounterPtr m_map_edit_event_counter
Definition server.h:784
void SendLocalPlayerAnimations(session_t peer_id, v2f animation_frames[4], f32 animation_speed)
Definition server.cpp:1988
float m_savemap_timer
Definition server.h:663
float m_liquid_transform_every
Definition server.h:660
void SendTimeOfDay(session_t peer_id, u16 time, f32 time_speed)
Definition server.cpp:1926
void process_PlayerPos(RemotePlayer *player, PlayerSAO *playersao, NetworkPacket *pkt)
Definition serverpackethandler.cpp:441
virtual ModStorageDatabase * getModStorageDatabase()
Definition server.h:320
Address m_bind_addr
Definition server.h:453
void DenyAccess(session_t peer_id, AccessDeniedCode reason, std::string_view custom_reason="", bool reconnect=false)
Definition server.cpp:2872
bool getClientInfo(session_t peer_id, ClientInfo &ret)
Definition server.cpp:1342
void SendBlockNoLock(session_t peer_id, MapBlock *block, u8 ver, u16 net_proto_version, SerializedBlockCache *cache=nullptr)
Definition server.cpp:2397
void SendHUDRemove(session_t peer_id, u32 id)
Definition server.cpp:1768
static std::string getBuiltinLuaPath()
Definition server.cpp:3848
void deleteParticleSpawner(const std::string &playername, u32 id)
Definition server.cpp:3562
void SendEyeOffset(session_t peer_id, v3f first, v3f third, v3f third_front)
Definition server.cpp:2007
IWritableItemDefManager * m_itemdef
Definition server.h:683
void handleCommand_ModChannelMsg(NetworkPacket *pkt)
Definition serverpackethandler.cpp:1782
ServerScripting * getScriptIface()
Definition server.h:305
void handleCommand_Init2(NetworkPacket *pkt)
Definition serverpackethandler.cpp:276
void yieldToOtherThreads(float dtime)
Definition server.cpp:1125
void handleCommand_GotBlocks(NetworkPacket *pkt)
Definition serverpackethandler.cpp:410
std::unique_ptr< MetricsBackend > m_metrics_backend
Definition server.h:774
std::unordered_map< u32, PendingDynamicMediaCallback > m_pending_dyn_media
Definition server.h:750
void handleCommand_Init(NetworkPacket *pkt)
Definition serverpackethandler.cpp:37
IntervalLimiter m_max_lag_decrease
Definition server.h:665
void acceptAuth(session_t peer_id, bool forSudoMode)
Definition server.cpp:2895
void reportFormspecPrependModified(const std::string &name)
Definition server.cpp:3256
void handleCommand_DeletedBlocks(NetworkPacket *pkt)
Definition serverpackethandler.cpp:539
void SendMovement(session_t peer_id)
Definition server.cpp:1398
void handleCommand_Damage(NetworkPacket *pkt)
Definition serverpackethandler.cpp:772
static bool migrateModStorageDatabase(const GameParams &game_params, const Settings &cmd_args)
Definition server.cpp:4230
void handleCommand_RemovedSounds(NetworkPacket *pkt)
Definition serverpackethandler.cpp:1291
void handleCommand_Deprecated(NetworkPacket *pkt)
Definition serverpackethandler.cpp:31
Map & getMap()
Definition server.h:357
void handleCommand_ChatMessage(NetworkPacket *pkt)
Definition serverpackethandler.cpp:747
void handleChatInterfaceEvent(ChatEvent *evt)
Definition server.cpp:3023
ServerThread * m_thread
Definition server.h:702
ServerInventoryManager * getInventoryMgr() const
Definition server.h:301
void SendActiveObjectMessages(session_t peer_id, const std::string &datas, bool reliable=true)
Definition server.cpp:2138
double getUptime() const
Definition server.h:254
void handleCommand_NodeMetaFields(NetworkPacket *pkt)
Definition serverpackethandler.cpp:1336
std::unique_ptr< PackedValue > m_lua_globals_data
Definition server.h:450
PlayerSAO * StageTwoClientInit(session_t peer_id)
Definition server.cpp:1171
void SendAddParticleSpawner(session_t peer_id, u16 protocol_version, const ParticleSpawnerParameters &p, u16 attached_id, u32 id)
Definition server.cpp:1619
void sendAddNode(v3s16 p, MapNode n, std::unordered_set< u16 > *far_players=nullptr, float far_d_nodes=100, bool remove_metadata=true)
Definition server.cpp:2304
std::vector< std::pair< std::string, std::string > > m_async_init_files
Definition server.h:445
void SendCSMRestrictionFlags(session_t peer_id)
Definition server.cpp:2150
void setPlayerEyeOffset(RemotePlayer *player, v3f first, v3f third, v3f third_front)
Definition server.cpp:3445
void peerAdded(con::IPeer *peer)
Definition server.cpp:1320
void reportInventoryFormspecModified(const std::string &name)
Definition server.cpp:3248
void SendSetStars(session_t peer_id, const StarParams ¶ms)
Definition server.cpp:1874
virtual void SendChatMessage(session_t peer_id, const ChatMessage &message)
Definition server.cpp:1532
std::string getStatusString()
Definition server.cpp:3173
void SendActiveObjectRemoveAdd(RemoteClient *client, PlayerSAO *playersao)
Definition server.cpp:2056
void AsyncRunStep(float dtime, bool initial_step=false)
Definition server.cpp:622
MetricGaugePtr m_timeofday_gauge
Definition server.h:779
Settings * m_game_settings
Definition server.h:652
SubgameSpec m_gamespec
Definition server.h:643
bool joinModChannel(const std::string &channel)
Definition server.cpp:4092
std::string getPlayerName(session_t peer_id)
Definition server.cpp:3157
void hudSetHotbarImage(RemotePlayer *player, const std::string &name)
Definition server.cpp:3407
void stepPendingDynMediaCallbacks(float dtime)
Definition server.cpp:2765
std::string m_path_world
Definition server.h:640
bool isSingleplayer() const
Definition server.h:335
bool dynamicAddMedia(const DynamicMediaArgs &args)
Definition server.cpp:3599
void handleCommand_ModChannelJoin(NetworkPacket *pkt)
Definition serverpackethandler.cpp:1733
void Send(NetworkPacket *pkt)
Definition server.cpp:1387
void handleCommand_RequestMedia(NetworkPacket *pkt)
Definition serverpackethandler.cpp:339
std::string *const m_shutdown_errmsg
Definition server.h:722
s32 m_playing_sounds_id_last_used
Definition server.h:757
u32 m_csm_restriction_noderange
Definition server.h:765
static u16 getProtocolVersionMin()
Definition server.cpp:4300
u32 addParticleSpawner(const ParticleSpawnerParameters &p, ServerActiveObject *attached, const std::string &playername)
Definition server.cpp:3533
void SendBlocks(float dtime)
Definition server.cpp:2428
void handleCommand_UpdateClientInfo(NetworkPacket *pkt)
Definition serverpackethandler.cpp:1838
void Receive(float min_time)
Receive and process all incoming packets.
Definition server.cpp:1073
void notifyPlayers(const std::wstring &msg)
Definition server.cpp:3508
std::unordered_map< std::pair< v3s16, u16 >, std::string, SBCHash > SerializedBlockCache
Definition server.h:511
bool hudSetHotbarItemcount(RemotePlayer *player, s32 hotbar_itemcount)
Definition server.cpp:3389
void SendNodeDef(session_t peer_id, const NodeDefManager *nodedef, u16 protocol_version)
Definition server.cpp:1482
StepSettings getStepSettings()
Definition server.h:344
void SendBreath(session_t peer_id, u16 breath)
Definition server.cpp:1442
std::shared_ptr< con::IConnection > m_con
Definition server.h:671
void setLocalPlayerAnimations(RemotePlayer *player, v2f animation_frames[4], f32 frame_speed)
Definition server.cpp:3437
void setClouds(RemotePlayer *player, const CloudParams ¶ms)
Definition server.cpp:3486
void HandlePlayerHPChange(PlayerSAO *sao, const PlayerHPChangeReason &reason)
Definition server.cpp:1418
float m_emergethread_trigger_timer
Definition server.h:662
ModIPCStore m_ipcstore
Definition server.h:693
std::string m_path_mod_data
Definition server.h:641
void sendMediaAnnouncement(session_t peer_id, const std::string &lang_code)
Definition server.cpp:2610
void setAsyncFatalError(const LuaError &e)
Definition server.h:348
void SendMinimapModes(session_t peer_id, std::vector< MinimapMode > &modes, size_t wanted_mode)
Definition server.cpp:2792
virtual EmergeManager * getEmergeManager()
Definition server.h:319
ServerEnvironment * m_env
Definition server.h:668
void fillMediaCache()
Definition server.cpp:2577
bool m_simple_singleplayer_mode
Definition server.h:646
std::unordered_map< std::string, Translations > server_translations
Definition server.h:691
virtual std::string getWorldPath() const
Definition server.h:331
ChatInterface * m_admin_chat
Definition server.h:717
NodeDefManager * m_nodedef
Definition server.h:686
bool hudChange(RemotePlayer *player, u32 id, HudElementStat stat, void *value)
Definition server.cpp:3359
void SendPlayerFov(session_t peer_id)
Definition server.cpp:1974
Definition settings.h:109
Definition test_moveaction.cpp:12
Definition test_server_shutdown_state.cpp:13
Definition translation.h:19
Definition connection.h:34
Definition peerhandler.h:13
Definition ordered_mutex.h:13
ClientState
Definition clientiface.h:165
@ CS_Active
Definition clientiface.h:174
#define BS
Definition constants.h:61
HudElementStat
Definition hud.h:59
MinimapType
Definition hud.h:108
@ MINIMAP_TYPE_OFF
Definition hud.h:109
core::vector2d< f32 > v2f
Definition irr_v2d.h:11
core::vector3d< s16 > v3s16
Definition irr_v3d.h:13
core::vector3df v3f
Definition irr_v3d.h:11
std::shared_ptr< MetricCounter > MetricCounterPtr
Definition metricsbackend.h:22
std::shared_ptr< MetricGauge > MetricGaugePtr
Definition metricsbackend.h:36
Definition activeobjectmgr.cpp:11
rtt_stat_type
Definition connection.h:16
Definition activeobjectmgr.cpp:11
AccessDeniedCode
Definition networkprotocol.h:902
@ CSM_RF_NONE
Definition networkprotocol.h:927
u16 session_t
Definition networkprotocol.h:22
@ AC_INTERACTION
Definition server.h:72
@ AC_MOVEMENT
Definition server.h:73
@ AC_DIGGING
Definition server.h:71
ClientDeletionReason
Definition server.h:83
@ CDR_LEAVE
Definition server.h:84
@ CDR_DENY
Definition server.h:86
@ CDR_TIMEOUT
Definition server.h:85
constexpr static const FlagDesc flagdesc_anticheat[]
Definition server.h:76
void dedicated_server_loop(Server &server, bool &kill)
Definition server.cpp:4033
SoundLocation
Definition sound.h:67
Definition chat_interface.h:49
Definition chat_interface.h:61
Definition chatmessage.h:20
Definition clientdynamicinfo.h:12
u32 uptime
Definition server.h:139
u8 ser_vers
Definition server.h:140
u8 patch
Definition server.h:142
u16 prot_vers
Definition server.h:141
ClientState state
Definition server.h:137
std::string vers_string
Definition server.h:143
Address addr
Definition server.h:138
std::string lang_code
Definition server.h:143
u8 major
Definition server.h:142
u8 minor
Definition server.h:142
Definition skyparams.h:65
Definition gameparams.h:12
Describes ambient light settings for a player.
Definition lighting.h:39
u16 size
Definition server.h:130
MinimapType type
Definition server.h:128
std::string texture
Definition server.h:131
std::string label
Definition server.h:129
u16 scale
Definition server.h:132
std::condition_variable_any condvar
Signalled on any changes to the map contents.
Definition server.h:153
std::shared_mutex mutex
RW lock for this entire structure.
Definition server.h:151
~ModIPCStore()
Definition server.cpp:74
std::unordered_map< std::string, std::unique_ptr< PackedValue > > map
Map storing the data.
Definition server.h:159
void signal()
Definition server.h:162
Definition skyparams.h:48
A packed value can be a primitive like a string or number but also a table including all of its conte...
Definition c_packer.h:72
Definition particles.h:303
Definition particles.h:314
Definition player_sao.h:227
Definition rollback_interface.h:40
std::string to_player
Definition server.h:117
float gain
Definition server.h:113
std::unordered_set< session_t > clients
Definition server.h:124
std::string exclude_player
Definition server.h:118
SoundSpec spec
Definition server.h:122
v3f pos
Definition server.h:115
float max_hear_distance
Definition server.h:114
v3f getPos(ServerEnvironment *env, bool *pos_exists) const
Definition server.cpp:166
SoundLocation type
Definition server.h:111
size_t operator()(const std::pair< v3s16, u16 > &p) const
Definition server.h:506
void trigger(float delay, const std::string &msg, bool reconnect)
Definition server.cpp:202
bool isTimerRunning() const
Definition server.h:493
void tick(float dtime, Server *server)
Definition server.cpp:209
void reset()
Definition server.cpp:194
bool is_requested
Definition server.h:485
bool should_reconnect
Definition server.h:486
float m_timer
Definition server.h:495
std::wstring getShutdownTimerMessage() const
Definition server.cpp:241
std::string message
Definition server.h:487
bool pause
Definition server.h:340
float steplen
Definition server.h:339
Definition skyparams.h:20
Describes the sound information for playback.
Definition sound.h:20
Definition skyparams.h:56
Definition skyparams.h:38
static std::string p(std::string path)
Definition test_filesys.cpp:53