mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-05 17:42:24 +00:00
[Loginserver] Add config option to display player count (#1738)
* [Loginserver] Add config option to display player count * Update name
This commit is contained in:
parent
cbea7045fa
commit
a6c85babfc
@ -553,7 +553,7 @@ void Client::DoSuccessfulLogin(
|
|||||||
login_reply.unk2 = 0;
|
login_reply.unk2 = 0;
|
||||||
login_reply.lsid = db_account_id;
|
login_reply.lsid = db_account_id;
|
||||||
login_reply.failed_attempts = 0;
|
login_reply.failed_attempts = 0;
|
||||||
login_reply.show_player_count = false; // todo: config option
|
login_reply.show_player_count = server.options.IsShowPlayerCountEnabled();
|
||||||
login_reply.offer_min_days = 99;
|
login_reply.offer_min_days = 99;
|
||||||
login_reply.offer_min_views = -1;
|
login_reply.offer_min_views = -1;
|
||||||
login_reply.offer_cooldown_minutes = 0;
|
login_reply.offer_cooldown_minutes = 0;
|
||||||
|
|||||||
@ -11,6 +11,7 @@
|
|||||||
},
|
},
|
||||||
"worldservers": {
|
"worldservers": {
|
||||||
"unregistered_allowed": true,
|
"unregistered_allowed": true,
|
||||||
|
"show_player_count": false,
|
||||||
"reject_duplicate_servers": false
|
"reject_duplicate_servers": false
|
||||||
},
|
},
|
||||||
"web_api": {
|
"web_api": {
|
||||||
|
|||||||
@ -64,6 +64,7 @@ void LoadServerConfig()
|
|||||||
false
|
false
|
||||||
));
|
));
|
||||||
server.options.AllowUnregistered(server.config.GetVariableBool("worldservers", "unregistered_allowed", true));
|
server.options.AllowUnregistered(server.config.GetVariableBool("worldservers", "unregistered_allowed", true));
|
||||||
|
server.options.SetShowPlayerCount(server.config.GetVariableBool("worldservers", "show_player_count", false));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Account
|
* Account
|
||||||
@ -240,6 +241,7 @@ int main(int argc, char **argv)
|
|||||||
#endif
|
#endif
|
||||||
LogInfo("[Config] [WorldServer] IsRejectingDuplicateServers [{0}]", server.options.IsRejectingDuplicateServers());
|
LogInfo("[Config] [WorldServer] IsRejectingDuplicateServers [{0}]", server.options.IsRejectingDuplicateServers());
|
||||||
LogInfo("[Config] [WorldServer] IsUnregisteredAllowed [{0}]", server.options.IsUnregisteredAllowed());
|
LogInfo("[Config] [WorldServer] IsUnregisteredAllowed [{0}]", server.options.IsUnregisteredAllowed());
|
||||||
|
LogInfo("[Config] [WorldServer] ShowPlayerCount [{0}]", server.options.IsShowPlayerCountEnabled());
|
||||||
LogInfo("[Config] [Security] GetEncryptionMode [{0}]", server.options.GetEncryptionMode());
|
LogInfo("[Config] [Security] GetEncryptionMode [{0}]", server.options.GetEncryptionMode());
|
||||||
LogInfo("[Config] [Security] IsTokenLoginAllowed [{0}]", server.options.IsTokenLoginAllowed());
|
LogInfo("[Config] [Security] IsTokenLoginAllowed [{0}]", server.options.IsTokenLoginAllowed());
|
||||||
LogInfo("[Config] [Security] IsPasswordLoginAllowed [{0}]", server.options.IsPasswordLoginAllowed());
|
LogInfo("[Config] [Security] IsPasswordLoginAllowed [{0}]", server.options.IsPasswordLoginAllowed());
|
||||||
|
|||||||
@ -113,6 +113,15 @@ public:
|
|||||||
inline void UpdateInsecurePasswords(bool b) { update_insecure_passwords = b; }
|
inline void UpdateInsecurePasswords(bool b) { update_insecure_passwords = b; }
|
||||||
inline bool IsUpdatingInsecurePasswords() const { return update_insecure_passwords; }
|
inline bool IsUpdatingInsecurePasswords() const { return update_insecure_passwords; }
|
||||||
|
|
||||||
|
inline bool IsShowPlayerCountEnabled() const
|
||||||
|
{
|
||||||
|
return show_player_count;
|
||||||
|
}
|
||||||
|
inline void SetShowPlayerCount(bool show_player_count)
|
||||||
|
{
|
||||||
|
Options::show_player_count = show_player_count;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool allow_unregistered;
|
bool allow_unregistered;
|
||||||
bool trace;
|
bool trace;
|
||||||
@ -122,6 +131,7 @@ private:
|
|||||||
bool reject_duplicate_servers;
|
bool reject_duplicate_servers;
|
||||||
bool allow_token_login;
|
bool allow_token_login;
|
||||||
bool allow_password_login;
|
bool allow_password_login;
|
||||||
|
bool show_player_count;
|
||||||
bool auto_create_accounts;
|
bool auto_create_accounts;
|
||||||
bool auto_link_accounts;
|
bool auto_link_accounts;
|
||||||
bool update_insecure_passwords;
|
bool update_insecure_passwords;
|
||||||
@ -130,5 +140,6 @@ private:
|
|||||||
std::string default_loginserver_name;
|
std::string default_loginserver_name;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user