/*
* InspIRCd -- Internet Relay Chat Daemon
*
+ * Copyright (C) 2014 Attila Molnar <attilamolnar@hush.com>
+ * Copyright (C) 2013, 2019, 2021 Sadie Powell <sadie@witchery.services>
+ * Copyright (C) 2013 ChrisTX <xpipe@hotmail.de>
+ * Copyright (C) 2012 Robby <robby@chatbelgie.be>
* Copyright (C) 2011 Adam <Adam@anope.org>
- * Copyright (C) 2007, 2009 Dennis Friis <peavey@inspircd.org>
- * Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
- * Copyright (C) 2007-2009 Craig Edwards <craigedwards@brainbox.cc>
- * Copyright (C) 2008 John Brooks <john.brooks@dereferenced.net>
- * Copyright (C) 2007 Burlex <???@???>
+ * Copyright (C) 2007-2008 Craig Edwards <brain@inspircd.org>
* Copyright (C) 2007 Robin Burchell <robin+git@viroteck.net>
+ * Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
*
* This file is part of InspIRCd. InspIRCd is free software: you can
* redistribute it and/or modify it under the terms of the GNU General Public
{
return dwErrorCode;
}
+
+WindowsStream::WindowsStream(DWORD handle)
+ : BackgroundColor(0)
+ , ForegroundColor(FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_GREEN)
+{
+ this->Handle = GetStdHandle(handle);
+ CONSOLE_SCREEN_BUFFER_INFO bufinf;
+ if (GetConsoleScreenBufferInfo(this->Handle, &bufinf))
+ {
+ this->BackgroundColor = bufinf.wAttributes & 0x00F0;
+ this->ForegroundColor = bufinf.wAttributes & 0x00FF;
+ }
+}