X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Finspircd.h;h=86853a94f3cebdc41ac8381ca50a4ec8e132110b;hb=0a0aa94537dd1be4a4acc2e992dee8d455328240;hp=c06a28043b4be3154ea91c3b28010922f846bd90;hpb=41c26a03fac6915c0abcde17bacb6563c50719e5;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/inspircd.h b/include/inspircd.h index c06a28043..86853a94f 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -31,10 +31,9 @@ #define _LARGEFILE_SOURCE #endif -#ifndef WIN32 +#ifndef _WIN32 #define DllExport #define CoreExport -#define printf_c printf #else #include "inspircd_win32wrapper.h" /** Windows defines these already */ @@ -55,7 +54,7 @@ #include #include #include -#ifndef WIN32 +#ifndef _WIN32 #include #endif @@ -71,6 +70,7 @@ #include "inspircd_config.h" #include "inspircd_version.h" #include "typedefs.h" +#include "consolecolors.h" CoreExport extern InspIRCd* ServerInstance; @@ -232,12 +232,24 @@ class serverstats /** Total bytes of data received */ unsigned long statsRecv; +#ifdef _WIN32 + /** Cpu usage at last sample + */ + FILETIME LastCPU; + /** Time QP sample was read + */ + LARGE_INTEGER LastSampled; + /** QP frequency + */ + LARGE_INTEGER QPFrequency; +#else /** Cpu usage at last sample */ timeval LastCPU; /** Time last sample was read */ timespec LastSampled; +#endif /** The constructor initializes all the counts to zero */ serverstats() @@ -308,10 +320,6 @@ class CoreExport InspIRCd */ char ReadBuffer[65535]; -#ifdef WIN32 - IPC* WindowsIPC; -#endif - public: /** Global cull list, will be processed on next iteration @@ -698,6 +706,16 @@ class CoreExport InspIRCd */ bool IsValidMask(const std::string &mask); + /** Strips all color codes from the given string + * @param sentence The string to strip from + */ + static void StripColor(std::string &sentence); + + /** Parses color codes from string values to actual color codes + * @param input The data to process + */ + static void ProcessColors(file_cache& input); + /** Rehash the local server */ void RehashServer();