#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 <sstream>
#include <string>
#include <vector>
* 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
*/
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.
*/
*/
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.
*/
*/
std::vector<std::string> 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<ListenSocket*> ports;
/** Boolean sets of which modules implement which functions
*/
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);