31#include <unordered_set>
34#include <shared_mutex>
35#include <condition_variable>
98 std::string_view sha1_digest_ =
""):
158 std::unordered_map<std::string, std::unique_ptr<PackedValue>>
map;
173 const std::string &path_world,
175 bool simple_singleplayer_mode,
179 std::string *shutdown_errmsg =
nullptr
191 void AsyncRunStep(
float dtime,
bool initial_step =
false);
259 void requestShutdown(
const std::string &msg,
bool reconnect,
float delay = 0.0f);
269 bool checkPriv(
const std::string &name,
const std::string &priv);
274 void setIpBanned(
const std::string &ip,
const std::string &name);
279 void notifyPlayer(
const char *name,
const std::wstring &msg);
293 std::optional<std::string_view>
data;
309 std::list<std::string> *log);
326 virtual const std::vector<ModSpec> &
getMods()
const;
355 bool showFormspec(
const char *name,
const std::string &formspec,
const std::string &formname);
391 std::string_view custom_reason =
"",
bool reconnect =
false);
393 const std::string &str_reason,
bool reconnect);
412 std::vector<MinimapMode> &modes,
430 std::unordered_map<std::string, std::string>
getMediaList();
435 const std::string &world_path,
const Settings &world_mt);
489 void trigger(
float delay,
const std::string &msg,
bool reconnect);
506 return std::hash<v3s16>()(
p.first) ^
p.second;
518 std::string_view custom_reason,
bool reconnect =
false);
521 u16 protocol_version);
528 f32 animation_speed);
534 const std::string &formname);
548 const std::string &message,
session_t from_peer);
557 float far_d_nodes = 100);
559 std::unordered_set<u16> *far_players =
nullptr,
560 float far_d_nodes = 100,
bool remove_metadata =
true);
562 v3f p,
float far_d_nodes, std::unordered_set<u16> *far_players);
565 float far_d_nodes = 100);
575 bool addMediaFile(
const std::string &filename,
const std::string &filepath,
576 std::string *filedata =
nullptr, std::string *digest =
nullptr);
580 const std::unordered_set<std::string> &tosend);
595 bool reliable =
true);
610 std::wstring
handleChat(
const std::string &name, std::wstring wmessage_input,
611 bool check_shout_priv =
false,
RemotePlayer *player =
nullptr);
670 std::shared_ptr<con::IConnection>
m_con;
746 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:442
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:540
Definition player_sao.h:56
Definition clientiface.h:213
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:460
EnvAutoLock(Server *server)
Definition server.h:457
void kickAllPlayers(AccessDeniedCode reason, const std::string &str_reason, bool reconnect)
Definition server.cpp:2873
void setIpBanned(const std::string &ip, const std::string &name)
Definition server.cpp:3257
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:3966
void DisconnectPeer(session_t peer_id)
Definition server.cpp:2882
IRollbackManager * m_rollback
Definition server.h:676
void stop()
Definition server.cpp:597
void handleCommand_FirstSrp(NetworkPacket *pkt)
Definition serverpackethandler.cpp:1446
float m_liquid_transform_timer
Definition server.h:658
void setStars(RemotePlayer *player, const StarParams ¶ms)
Definition server.cpp:3472
void setSun(RemotePlayer *player, const SunParams ¶ms)
Definition server.cpp:3458
RemoteClient * getClientNoEx(session_t peer_id, ClientState state_min=CS_Active)
Definition server.cpp:3145
Translations * getTranslationLanguage(const std::string &lang_code)
Definition server.cpp:4145
void handleCommand_PlayerItem(NetworkPacket *pkt)
Definition serverpackethandler.cpp:810
std::unordered_map< session_t, std::string > m_formspec_state_data
Definition server.h:708
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:3752
std::string m_admin_nick
Definition server.h:717
void init()
Definition server.cpp:431
u16 m_max_chatmessage_length
Definition server.h:646
void requestShutdown(const std::string &msg, bool reconnect, float delay=0.0f)
Definition server.cpp:3934
void setStepSettings(StepSettings spdata)
Definition server.h:342
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:3424
void overrideDayNightRatio(RemotePlayer *player, bool do_override, float brightness)
Definition server.cpp:3486
void SendPlayerInventoryFormspec(session_t peer_id)
Definition server.cpp:2033
void HandlePlayerDeath(PlayerSAO *sao, const PlayerHPChangeReason &reason)
Definition server.cpp:2846
static u16 getProtocolVersionMax()
Definition server.cpp:4303
void SendMovePlayer(PlayerSAO *sao)
Definition server.cpp:1947
void DenySudoAccess(session_t peer_id)
Definition server.cpp:2858
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:688
ModStorageDatabase * m_mod_storage_database
Definition server.h:759
const ClientDynamicInfo * getClientDynamicInfo(session_t peer_id)
Definition server.cpp:1366
void spawnParticle(const std::string &playername, const ParticleParameters &p)
Definition server.cpp:3506
void step()
Definition server.cpp:608
virtual IItemDefManager * getItemDefManager()
Definition server.cpp:3796
MutexedVariable< std::string > m_async_fatal_error
Definition server.h:654
static ModStorageDatabase * openModStorageDatabase(const std::string &world_path)
Definition server.cpp:4182
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:746
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:763
bool checkInteractDistance(RemotePlayer *player, const f32 d, const std::string &what)
Definition serverpackethandler.cpp:851
void reportPrivsModified(const std::string &name="")
Definition server.cpp:3219
void sendDetachedInventory(Inventory *inventory, const std::string &name, session_t peer_id)
Definition server.cpp:2801
void handleCommand_Null(NetworkPacket *pkt)
Definition server.h:205
void handleCommand_SrpBytesA(NetworkPacket *pkt)
Definition serverpackethandler.cpp:1535
void fadeSound(s32 handle, float step, float gain)
Definition server.cpp:2271
std::queue< MapEditEvent * > m_unsent_map_edit_queue
Definition server.h:736
void hudSetHotbarSelectedImage(RemotePlayer *player, const std::string &name)
Definition server.cpp:3412
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:2913
void ProcessData(NetworkPacket *pkt)
Definition server.cpp:1246
bool denyIfBanned(session_t peer_id)
Definition server.cpp:3277
void setAsyncFatalError(const std::string &error)
Definition server.h:345
s32 playSound(ServerPlayingSound ¶ms, bool ephemeral=false)
Definition server.cpp:2182
BanManager * m_banmanager
Definition server.h:673
void setSky(RemotePlayer *player, const SkyboxParams ¶ms)
Definition server.cpp:3451
bool m_dedicated
Definition server.h:648
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:4105
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:332
void handleCommand_InventoryAction(NetworkPacket *pkt)
Definition serverpackethandler.cpp:564
std::unique_ptr< EmergeManager > m_emerge
Definition server.h:679
void handleCommand_Interact(NetworkPacket *pkt)
Definition serverpackethandler.cpp:879
void SendMovePlayerRel(session_t peer_id, const v3f &added_pos)
Definition server.cpp:1967
virtual ICraftDefManager * getCraftDefManager()
Definition server.cpp:3806
v3f findSpawnPos()
Definition server.cpp:3863
VoxelArea m_ignore_map_edit_events_area
Definition server.h:743
std::set< std::string > getPlayerEffectivePrivs(const std::string &name)
Definition server.cpp:3206
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:3836
IntervalLimiter m_map_timer_and_unload_interval
Definition server.h:663
void handleCommand_PlayerPos(NetworkPacket *pkt)
Definition serverpackethandler.cpp:503
void SendHUDSetFlags(session_t peer_id, u32 flags, u32 mask)
Definition server.cpp:1806
~Server()
Definition server.cpp:334
std::unique_ptr< ServerModManager > m_modmgr
Definition server.h:471
ServerEnvironment & getEnv()
Definition server.h:357
void sendDetachedInventories(session_t peer_id, bool incremental)
Definition server.cpp:2827
std::unordered_map< std::string, std::string > getMediaList()
Definition server.cpp:4169
PlayerSAO * getPlayerSAO(session_t peer_id)
Definition server.cpp:3158
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:3035
MetricGaugePtr m_lag_gauge
Definition server.h:779
void notifyPlayer(const char *name, const std::wstring &msg)
Definition server.cpp:3293
void setMoon(RemotePlayer *player, const MoonParams ¶ms)
Definition server.cpp:3465
ClientInterface m_clients
Definition server.h:706
void stopSound(s32 handle)
Definition server.cpp:2252
float m_time_of_day_send_timer
Definition server.h:657
void handleCommand_SrpBytesM(NetworkPacket *pkt)
Definition serverpackethandler.cpp:1642
void handleCommand_InventoryFields(NetworkPacket *pkt)
Definition serverpackethandler.cpp:1383
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:328
MetricGaugePtr m_player_gauge
Definition server.h:777
void addShutdownError(const ModError &e)
Definition server.cpp:3847
float m_mod_storage_save_timer
Definition server.h:760
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:4096
std::string getBanDescription(const std::string &ip_or_name)
Definition server.cpp:3272
std::unordered_map< s32, ServerPlayingSound > m_playing_sounds
Definition server.h:755
virtual const NodeDefManager * getNodeDefManager()
Definition server.cpp:3801
virtual std::string getModDataPath() const
Definition server.h:331
void onMapEditEvent(const MapEditEvent &event)
Definition server.cpp:1312
MetricCounterPtr m_packet_recv_processed_counter
Definition server.h:782
float m_masterserver_timer
Definition server.h:660
void SendSetSun(session_t peer_id, const SunParams ¶ms)
Definition server.cpp:1856
void setLighting(RemotePlayer *player, const Lighting &lighting)
Definition server.cpp:3494
void SendSetMoon(session_t peer_id, const MoonParams ¶ms)
Definition server.cpp:1865
void UpdateCrafting(RemotePlayer *player)
Definition server.cpp:2991
bool checkPriv(const std::string &name, const std::string &priv)
Definition server.cpp:3213
void handleCommand_HaveMedia(NetworkPacket *pkt)
Definition serverpackethandler.cpp:1806
bool leaveModChannel(const std::string &channel)
Definition server.cpp:4091
NodeDefManager * getWritableNodeDefManager()
Definition server.cpp:3821
ShutdownState m_shutdown_state
Definition server.h:714
std::atomic< StepSettings > m_step_settings
Definition server.h:698
MetricCounterPtr m_uptime_counter
Definition server.h:776
IWritableItemDefManager * getWritableItemDefManager()
Definition server.cpp:3816
void handleCommand_ModChannelLeave(NetworkPacket *pkt)
Definition serverpackethandler.cpp:1753
void handleCommand_ClientReady(NetworkPacket *pkt)
Definition serverpackethandler.cpp:358
void SendPlayerHP(PlayerSAO *sao, bool effect)
Definition server.cpp:1430
void handleAdminChat(const ChatEventChat *evt)
Definition server.cpp:3124
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:3137
void SendSetLighting(session_t peer_id, const Lighting &lighting)
Definition server.cpp:1904
IRollbackManager * getRollbackManager()
Definition server.h:317
void SendInventory(RemotePlayer *player, bool incremental)
Definition server.cpp:1510
bool hudSetFlags(RemotePlayer *player, u32 flags, u32 mask)
Definition server.cpp:3361
std::vector< std::pair< std::string, std::string > > m_mapgen_init_files
Definition server.h:446
float m_step_pending_dyn_media_timer
Definition server.h:750
void start()
Definition server.cpp:558
MetricCounterPtr m_aom_buffer_counter[2]
Definition server.h:780
MetricCounterPtr m_packet_recv_counter
Definition server.h:781
IWritableCraftDefManager * getWritableCraftDefManager()
Definition server.cpp:3826
void SendHUDAdd(session_t peer_id, u32 id, HudElement *form)
Definition server.cpp:1756
std::unique_ptr< ModChannelMgr > m_modchannel_mgr
Definition server.h:767
bool isShutdownRequested() const
Definition server.h:256
std::unique_ptr< ServerInventoryManager > m_inventory_mgr
Definition server.h:770
void deletingPeer(con::IPeer *peer, bool timeout)
Definition server.cpp:1327
virtual const std::vector< ModSpec > & getMods() const
Definition server.cpp:3831
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:3811
bool showFormspec(const char *name, const std::string &formspec, const std::string &formname)
Definition server.cpp:3310
bool hudRemove(RemotePlayer *player, u32 id)
Definition server.cpp:3337
void SendHUDSetParam(session_t peer_id, u16 param, std::string_view value)
Definition server.cpp:1815
ordered_mutex m_env_mutex
Definition server.h:636
void broadcastModChannelMessage(const std::string &channel, const std::string &message, session_t from_peer)
Definition server.cpp:4110
void unsetIpBanned(const std::string &ip_or_name)
Definition server.cpp:3267
std::unique_ptr< ServerScripting > m_script
Definition server.h:468
void sendRequestedMedia(session_t peer_id, const std::unordered_set< std::string > &tosend)
Definition server.cpp:2660
u32 hudAdd(RemotePlayer *player, HudElement *element)
Definition server.cpp:3325
MetricCounterPtr m_map_edit_event_counter
Definition server.h:783
void SendLocalPlayerAnimations(session_t peer_id, v2f animation_frames[4], f32 animation_speed)
Definition server.cpp:1988
float m_savemap_timer
Definition server.h:662
float m_liquid_transform_every
Definition server.h:659
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:436
virtual ModStorageDatabase * getModStorageDatabase()
Definition server.h:319
Address m_bind_addr
Definition server.h:452
void DenyAccess(session_t peer_id, AccessDeniedCode reason, std::string_view custom_reason="", bool reconnect=false)
Definition server.cpp:2865
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:3841
void deleteParticleSpawner(const std::string &playername, u32 id)
Definition server.cpp:3555
void SendEyeOffset(session_t peer_id, v3f first, v3f third, v3f third_front)
Definition server.cpp:2007
IWritableItemDefManager * m_itemdef
Definition server.h:682
void handleCommand_ModChannelMsg(NetworkPacket *pkt)
Definition serverpackethandler.cpp:1777
ServerScripting * getScriptIface()
Definition server.h:304
void handleCommand_Init2(NetworkPacket *pkt)
Definition serverpackethandler.cpp:271
void yieldToOtherThreads(float dtime)
Definition server.cpp:1125
void handleCommand_GotBlocks(NetworkPacket *pkt)
Definition serverpackethandler.cpp:405
std::unique_ptr< MetricsBackend > m_metrics_backend
Definition server.h:773
std::unordered_map< u32, PendingDynamicMediaCallback > m_pending_dyn_media
Definition server.h:749
void handleCommand_Init(NetworkPacket *pkt)
Definition serverpackethandler.cpp:38
IntervalLimiter m_max_lag_decrease
Definition server.h:664
void acceptAuth(session_t peer_id, bool forSudoMode)
Definition server.cpp:2888
void reportFormspecPrependModified(const std::string &name)
Definition server.cpp:3249
void handleCommand_DeletedBlocks(NetworkPacket *pkt)
Definition serverpackethandler.cpp:534
void SendMovement(session_t peer_id)
Definition server.cpp:1398
void handleCommand_Damage(NetworkPacket *pkt)
Definition serverpackethandler.cpp:767
static bool migrateModStorageDatabase(const GameParams &game_params, const Settings &cmd_args)
Definition server.cpp:4223
void handleCommand_RemovedSounds(NetworkPacket *pkt)
Definition serverpackethandler.cpp:1286
void handleCommand_Deprecated(NetworkPacket *pkt)
Definition serverpackethandler.cpp:32
Map & getMap()
Definition server.h:356
void handleCommand_ChatMessage(NetworkPacket *pkt)
Definition serverpackethandler.cpp:742
void handleChatInterfaceEvent(ChatEvent *evt)
Definition server.cpp:3016
ServerThread * m_thread
Definition server.h:701
ServerInventoryManager * getInventoryMgr() const
Definition server.h:300
void SendActiveObjectMessages(session_t peer_id, const std::string &datas, bool reliable=true)
Definition server.cpp:2138
double getUptime() const
Definition server.h:253
void handleCommand_NodeMetaFields(NetworkPacket *pkt)
Definition serverpackethandler.cpp:1331
std::unique_ptr< PackedValue > m_lua_globals_data
Definition server.h:449
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:444
void SendCSMRestrictionFlags(session_t peer_id)
Definition server.cpp:2150
void setPlayerEyeOffset(RemotePlayer *player, v3f first, v3f third, v3f third_front)
Definition server.cpp:3438
void peerAdded(con::IPeer *peer)
Definition server.cpp:1320
void reportInventoryFormspecModified(const std::string &name)
Definition server.cpp:3241
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:3166
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:778
Settings * m_game_settings
Definition server.h:651
SubgameSpec m_gamespec
Definition server.h:642
bool joinModChannel(const std::string &channel)
Definition server.cpp:4085
std::string getPlayerName(session_t peer_id)
Definition server.cpp:3150
void hudSetHotbarImage(RemotePlayer *player, const std::string &name)
Definition server.cpp:3400
void stepPendingDynMediaCallbacks(float dtime)
Definition server.cpp:2758
std::string m_path_world
Definition server.h:639
bool isSingleplayer() const
Definition server.h:334
bool dynamicAddMedia(const DynamicMediaArgs &args)
Definition server.cpp:3592
void handleCommand_ModChannelJoin(NetworkPacket *pkt)
Definition serverpackethandler.cpp:1728
void Send(NetworkPacket *pkt)
Definition server.cpp:1387
void handleCommand_RequestMedia(NetworkPacket *pkt)
Definition serverpackethandler.cpp:334
std::string *const m_shutdown_errmsg
Definition server.h:721
s32 m_playing_sounds_id_last_used
Definition server.h:756
u32 m_csm_restriction_noderange
Definition server.h:764
static u16 getProtocolVersionMin()
Definition server.cpp:4293
u32 addParticleSpawner(const ParticleSpawnerParameters &p, ServerActiveObject *attached, const std::string &playername)
Definition server.cpp:3526
void SendBlocks(float dtime)
Definition server.cpp:2428
void handleCommand_UpdateClientInfo(NetworkPacket *pkt)
Definition serverpackethandler.cpp:1833
void Receive(float min_time)
Receive and process all incoming packets.
Definition server.cpp:1073
void notifyPlayers(const std::wstring &msg)
Definition server.cpp:3501
std::unordered_map< std::pair< v3s16, u16 >, std::string, SBCHash > SerializedBlockCache
Definition server.h:510
bool hudSetHotbarItemcount(RemotePlayer *player, s32 hotbar_itemcount)
Definition server.cpp:3382
void SendNodeDef(session_t peer_id, const NodeDefManager *nodedef, u16 protocol_version)
Definition server.cpp:1482
StepSettings getStepSettings()
Definition server.h:343
void SendBreath(session_t peer_id, u16 breath)
Definition server.cpp:1442
std::shared_ptr< con::IConnection > m_con
Definition server.h:670
void setLocalPlayerAnimations(RemotePlayer *player, v2f animation_frames[4], f32 frame_speed)
Definition server.cpp:3430
void setClouds(RemotePlayer *player, const CloudParams ¶ms)
Definition server.cpp:3479
void HandlePlayerHPChange(PlayerSAO *sao, const PlayerHPChangeReason &reason)
Definition server.cpp:1418
float m_emergethread_trigger_timer
Definition server.h:661
ModIPCStore m_ipcstore
Definition server.h:692
std::string m_path_mod_data
Definition server.h:640
void sendMediaAnnouncement(session_t peer_id, const std::string &lang_code)
Definition server.cpp:2603
void setAsyncFatalError(const LuaError &e)
Definition server.h:347
void SendMinimapModes(session_t peer_id, std::vector< MinimapMode > &modes, size_t wanted_mode)
Definition server.cpp:2785
virtual EmergeManager * getEmergeManager()
Definition server.h:318
ServerEnvironment * m_env
Definition server.h:667
void fillMediaCache()
Definition server.cpp:2570
bool m_simple_singleplayer_mode
Definition server.h:645
std::unordered_map< std::string, Translations > server_translations
Definition server.h:690
virtual std::string getWorldPath() const
Definition server.h:330
ChatInterface * m_admin_chat
Definition server.h:716
NodeDefManager * m_nodedef
Definition server.h:685
bool hudChange(RemotePlayer *player, u32 id, HudElementStat stat, void *value)
Definition server.cpp:3352
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:164
@ CS_Active
Definition clientiface.h:173
#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:71
@ AC_MOVEMENT
Definition server.h:72
@ AC_DIGGING
Definition server.h:70
ClientDeletionReason
Definition server.h:82
@ CDR_LEAVE
Definition server.h:83
@ CDR_DENY
Definition server.h:85
@ CDR_TIMEOUT
Definition server.h:84
constexpr static const FlagDesc flagdesc_anticheat[]
Definition server.h:75
void dedicated_server_loop(Server &server, bool &kill)
Definition server.cpp:4026
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:138
u8 ser_vers
Definition server.h:139
u8 patch
Definition server.h:141
u16 prot_vers
Definition server.h:140
ClientState state
Definition server.h:136
std::string vers_string
Definition server.h:142
Address addr
Definition server.h:137
std::string lang_code
Definition server.h:142
u8 major
Definition server.h:141
u8 minor
Definition server.h:141
Definition skyparams.h:65
Definition gameparams.h:12
Describes ambient light settings for a player.
Definition lighting.h:39
u16 size
Definition server.h:129
MinimapType type
Definition server.h:127
std::string texture
Definition server.h:130
std::string label
Definition server.h:128
u16 scale
Definition server.h:131
std::condition_variable_any condvar
Signalled on any changes to the map contents.
Definition server.h:152
std::shared_mutex mutex
RW lock for this entire structure.
Definition server.h:150
~ModIPCStore()
Definition server.cpp:75
std::unordered_map< std::string, std::unique_ptr< PackedValue > > map
Map storing the data.
Definition server.h:158
void signal()
Definition server.h:161
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:304
Definition particles.h:315
Definition player_sao.h:227
Definition rollback_interface.h:40
std::string to_player
Definition server.h:116
float gain
Definition server.h:112
std::unordered_set< session_t > clients
Definition server.h:123
std::string exclude_player
Definition server.h:117
SoundSpec spec
Definition server.h:121
v3f pos
Definition server.h:114
float max_hear_distance
Definition server.h:113
v3f getPos(ServerEnvironment *env, bool *pos_exists) const
Definition server.cpp:167
SoundLocation type
Definition server.h:110
size_t operator()(const std::pair< v3s16, u16 > &p) const
Definition server.h:505
void trigger(float delay, const std::string &msg, bool reconnect)
Definition server.cpp:203
bool isTimerRunning() const
Definition server.h:492
void tick(float dtime, Server *server)
Definition server.cpp:210
void reset()
Definition server.cpp:195
bool is_requested
Definition server.h:484
bool should_reconnect
Definition server.h:485
float m_timer
Definition server.h:494
std::wstring getShutdownTimerMessage() const
Definition server.cpp:242
std::string message
Definition server.h:486
bool pause
Definition server.h:339
float steplen
Definition server.h:338
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