forked from OpenGamers/abaddon
add option to autoconnect (closes #114)
This commit is contained in:
parent
772598996c
commit
64245bf745
@ -495,6 +495,11 @@ void Abaddon::RunFirstTimeDiscordStartup() {
|
||||
confirm.SetAcceptOnly(true);
|
||||
confirm.run();
|
||||
}
|
||||
|
||||
// autoconnect
|
||||
if (cookie.has_value() && build_number.has_value() && GetSettings().Autoconnect && !GetDiscordToken().empty()) {
|
||||
ActionConnect();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -39,6 +39,7 @@ void SettingsManager::ReadSettings() {
|
||||
SMSTR("discord", "token", DiscordToken);
|
||||
SMBOOL("discord", "memory_db", UseMemoryDB);
|
||||
SMBOOL("discord", "prefetch", Prefetch);
|
||||
SMBOOL("discord", "autoconnect", Autoconnect);
|
||||
SMSTR("gui", "css", MainCSS);
|
||||
SMBOOL("gui", "animated_guild_hover_only", AnimatedGuildHoverOnly);
|
||||
SMBOOL("gui", "animations", ShowAnimations);
|
||||
@ -94,6 +95,7 @@ void SettingsManager::Close() {
|
||||
SMSTR("discord", "token", DiscordToken);
|
||||
SMBOOL("discord", "memory_db", UseMemoryDB);
|
||||
SMBOOL("discord", "prefetch", Prefetch);
|
||||
SMBOOL("discord", "autoconnect", Autoconnect);
|
||||
SMSTR("gui", "css", MainCSS);
|
||||
SMBOOL("gui", "animated_guild_hover_only", AnimatedGuildHoverOnly);
|
||||
SMBOOL("gui", "animations", ShowAnimations);
|
||||
|
@ -12,6 +12,7 @@ public:
|
||||
std::string DiscordToken;
|
||||
bool UseMemoryDB { false };
|
||||
bool Prefetch { false };
|
||||
bool Autoconnect { false };
|
||||
|
||||
// [gui]
|
||||
std::string MainCSS { "main.css" };
|
||||
|
Loading…
Reference in New Issue
Block a user