diff options
| author | Maks Szokalski <42069493+illunix@users.noreply.github.com> | 2021-10-01 16:37:39 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2022-03-19 20:07:17 +0100 |
| commit | 179686d4c9e1c73f0752b4a27767c926771115af (patch) | |
| tree | df7cf76230b778bfadcc4bf63fa0dc628f9049eb /src | |
| parent | 72a4fccaab4e83801c33c533cbcfdba1c6c43022 (diff) | |
Flash worldserver on taskbar on thread start (#26886)
* Flush worldserver on taskbar on thread start
* update
* update
* fix codestyle
* Update worldserver.conf.dist
* Update src/server/worldserver/worldserver.conf.dist
Co-authored-by: NoName <322016+Faq@users.noreply.github.com>
Co-authored-by: NoName <322016+Faq@users.noreply.github.com>
(cherry picked from commit b1e7f2489c071fefb3cff3bbd295c45c81e7a69c)
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/worldserver/CommandLine/CliRunnable.cpp | 14 | ||||
| -rw-r--r-- | src/server/worldserver/worldserver.conf.dist | 8 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/server/worldserver/CommandLine/CliRunnable.cpp b/src/server/worldserver/CommandLine/CliRunnable.cpp index ee07dc650a1..5e8fd69a072 100644 --- a/src/server/worldserver/CommandLine/CliRunnable.cpp +++ b/src/server/worldserver/CommandLine/CliRunnable.cpp @@ -29,6 +29,8 @@ #include "ChatCommand.h" #include <readline/readline.h> #include <readline/history.h> +#else +#include <Windows.h> #endif static constexpr char CLI_PREFIX[] = "TC> "; @@ -121,6 +123,18 @@ void CliThread() if (sConfigMgr->GetBoolDefault("BeepAtStart", true)) printf("\a"); // \a = Alert +#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS + if (sConfigMgr->GetBoolDefault("FlashAtStart", true)) + { + FLASHWINFO fInfo; + fInfo.cbSize = sizeof(FLASHWINFO); + fInfo.dwFlags = FLASHW_TRAY | FLASHW_TIMERNOFG; + fInfo.hwnd = GetConsoleWindow(); + fInfo.uCount = 0; + fInfo.dwTimeout = 0; + FlashWindowEx(&fInfo); + } +#endif ///- As long as the World is running (no World::m_stopEvent), get the command line and handle it while (!World::IsStopped()) { diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist index f161c738186..1684685d0e1 100644 --- a/src/server/worldserver/worldserver.conf.dist +++ b/src/server/worldserver/worldserver.conf.dist @@ -1257,6 +1257,14 @@ Event.Announce = 0 BeepAtStart = 1 # +# FlashAtStart +# Description: Flashes in taskbar when the world server finished starting. (Works on Windows only) +# Default: 1 - (Enabled) +# 0 - (Disabled) + +FlashAtStart = 1 + +# # Motd # Description: Message of the Day, displayed at login. Use '@' for a newline. # Example: "Welcome to John's Server!@This server is proud to be powered by Trinity Core." |
