diff options
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r-- | src/inspircd.cpp | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index c0d7a1614..fca3af6b4 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -41,9 +41,11 @@ #include <pwd.h> // setuid #include <grp.h> // setgid #else - WORD g_wOriginalColors; - WORD g_wBackgroundColor; - HANDLE g_hStdout; + /** Manages formatting lines written to stderr on Windows. */ + WindowsStream StandardError(STD_ERROR_HANDLE); + + /** Manages formatting lines written to stdout on Windows. */ + WindowsStream StandardOutput(STD_OUTPUT_HANDLE); #endif #include <fstream> @@ -492,22 +494,6 @@ InspIRCd::InspIRCd(int argc, char** argv) this->Config->cmdline.argc = argc; ParseOptions(); -#ifdef _WIN32 - // Initialize the console values - g_hStdout = GetStdHandle(STD_OUTPUT_HANDLE); - CONSOLE_SCREEN_BUFFER_INFO bufinf; - if(GetConsoleScreenBufferInfo(g_hStdout, &bufinf)) - { - g_wOriginalColors = bufinf.wAttributes & 0x00FF; - g_wBackgroundColor = bufinf.wAttributes & 0x00F0; - } - else - { - g_wOriginalColors = FOREGROUND_RED|FOREGROUND_BLUE|FOREGROUND_GREEN; - g_wBackgroundColor = 0; - } -#endif - { ServiceProvider* provs[] = { |