X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Finspircd.h;h=78348ed54c4957d411c97a6a657d0c13eee8f4c7;hb=584cbe80152ed3bb8cdbedc41c43d63cd10ca799;hp=b61ef8031a1432e0edfe8fb1c43e9659991edd7f;hpb=954786c678c411bd28016dcbc2b4d68ca861fb58;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/inspircd.h b/include/inspircd.h index b61ef8031..78348ed54 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -47,6 +47,7 @@ #endif // Required system headers. +#include #include #include #include @@ -169,7 +170,7 @@ inline std::string ConvToStr(const bool in) */ inline std::string ConvToStr(char in) { - return std::string(in,1); + return std::string(1, in); } /** Template function to convert any input type to std::string @@ -454,7 +455,7 @@ class CoreExport InspIRCd /** Set to the current signal recieved */ - int s_signal; + static sig_atomic_t s_signal; /** Protocol interface, overridden by server protocol modules */ @@ -705,9 +706,9 @@ class CoreExport InspIRCd * @return True i the mask is valid */ bool IsValidMask(const std::string &mask); - + /** Strips all color codes from the given string - * @para sentence The string to strip from + * @param sentence The string to strip from */ static void StripColor(std::string &sentence); @@ -778,9 +779,10 @@ class CoreExport InspIRCd /** Attempt to write the process id to a given file * @param filename The PID file to attempt to write to + * @param exitonfail If true and the PID fail cannot be written log to stdout and exit, otherwise only log on failure * @return This function may bail if the file cannot be written */ - void WritePID(const std::string &filename); + void WritePID(const std::string& filename, bool exitonfail = true); /** This constructor initialises all the subsystems and reads the config file. * @param argc The argument count passed to main()