X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=include%2Fconfigreader.h;h=70b1bc800f6caa3c0effa869f4a388c1304d85fc;hb=3cb0d3f0f84bb9ad56b5724fbef85c5ae7d14d77;hp=514e5e9b3834a9a8bd4d58ef80d429f6009d33e6;hpb=b1d06ea1d3a4a11a8253e0d81c832cb54c3c0946;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/configreader.h b/include/configreader.h index 514e5e9b3..70b1bc800 100644 --- a/include/configreader.h +++ b/include/configreader.h @@ -14,6 +14,13 @@ #ifndef INSPIRCD_CONFIGREADER #define INSPIRCD_CONFIGREADER +/* handy defines */ + +/** Determines if a channel op is exempt from given mode m, + * in config of server instance s. + */ +#define CHANOPS_EXEMPT(s, m) (s->Config->ExemptChanOps[(unsigned char)m]) + #include #include #include @@ -173,7 +180,7 @@ typedef std::map operclass_t; * and storage of the configuration data needed to run the ircd, such as * the servername, connect classes, /ADMIN data, MOTDs and filenames etc. */ -class ServerConfig : public Extensible +class CoreExport ServerConfig : public Extensible { private: /** Creator/owner @@ -349,6 +356,17 @@ class ServerConfig : public Extensible */ bool AllowHalfop; + /** If this is set to true, then mode lists (e.g + * MODE #chan b) are hidden from unprivileged + * users. + */ + bool HideModeLists[256]; + + /** If this is set to true, then channel operators + * are exempt from this channel mode. Used for +Sc etc. + */ + bool ExemptChanOps[256]; + /** The number of seconds the DNS subsystem * will wait before timing out any request. */ @@ -416,10 +434,9 @@ class ServerConfig : public Extensible */ char HideWhoisServer[MAXBUF]; - /** A list of IP addresses the server is listening - * on. + /** Set to a non empty string to obfuscate nicknames prepended to a KILL. */ - char addrs[MAXBUF][255]; + char HideKillsServer[MAXBUF]; /** The MOTD file, cached in a file_cache type. */ @@ -443,13 +460,9 @@ class ServerConfig : public Extensible */ std::vector module_names; - /** A list of ports which the server is listening on - */ - int ports[255]; - - /** A list of the file descriptors for the listening client ports + /** A list of the classes for listening client ports */ - ListenSocket* openSockfd[255]; + std::vector ports; /** Boolean sets of which modules implement which functions */ @@ -643,14 +656,14 @@ class ServerConfig : public Extensible bool AddIOHook(Module* iomod, InspSocket* is); bool DelIOHook(InspSocket* is); - static std::string GetFullProgDir(char** argv, int argc); + std::string GetFullProgDir(); static bool DirValid(const char* dirandfile); static char* CleanFilename(char* name); static bool FileExists(const char* file); }; -bool InitializeDisabledCommands(const char* data, InspIRCd* ServerInstance); +CoreExport bool InitializeDisabledCommands(const char* data, InspIRCd* ServerInstance); bool InitTypes(ServerConfig* conf, const char* tag); bool InitClasses(ServerConfig* conf, const char* tag);