/** 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])
+#define CHANOPS_EXEMPT(m) (ServerInstance->Config->ExemptChanOps[(unsigned char)m])
#include <sstream>
#include <string>
/** Holds an oper class.
*/
-struct operclass_data : public Extensible
+struct operclass_data : public classbase
{
/** Command list for the class
*/
- char *commandlist;
+ std::string commandlist;
/** Channel mode list for the class
*/
- char *cmodelist;
+ std::string cmodelist;
/** User mode list for the class
*/
- char *umodelist;
+ std::string umodelist;
/** Priviledges given by this class
*/
- char *privs;
+ std::string privs;
};
/** A Set of oper classes
/** Defines the server's length limits on various length-limited
* items such as topics, nicknames, channel names etc.
*/
-class ServerLimits : public Extensible
+class ServerLimits
{
public:
/** Maximum nickname length */
* and storage of the configuration data needed to run the ircd, such as
* the servername, connect classes, /ADMIN data, MOTDs and filenames etc.
*/
-class CoreExport ServerConfig : public Extensible
+class CoreExport ServerConfig : public classbase
{
private:
- /** Creator/owner pointer
- */
- InspIRCd* ServerInstance;
-
/** This variable holds the names of all
* files included from the main one. This
* is used to make sure that no files are
* configutation, appending errors to errorstream
* and setting error if an error has occured.
*/
- bool ParseLine(const std::string &filename, std::string &line, long &linenumber);
+ bool ParseLine(const std::string &filename, std::string &line, long &linenumber, bool allowexeinc);
/** Check that there is only one of each configuration item
*/
/** Process an include file directive
*/
- bool DoInclude(const std::string &file);
+ bool DoInclude(const std::string &file, bool allowexeinc);
/** Error stream, contains error output from any failed configuration parsing.
*/
/** Used to indicate who we announce invites to on a channel */
enum InviteAnnounceState { INVITE_ANNOUNCE_NONE, INVITE_ANNOUNCE_ALL, INVITE_ANNOUNCE_OPS, INVITE_ANNOUNCE_DYNAMIC };
- /** Returns the creator InspIRCd pointer
- */
- InspIRCd* GetInstance();
-
/** Not used any more as it is named, can probably be removed or renamed.
*/
int DoDownloads();
/** Construct a new ServerConfig
*/
- ServerConfig(InspIRCd* Instance);
+ ServerConfig();
/** Get server ID as string with required leading zeroes
*/
/** Load 'filename' into 'target', with the new config parser everything is parsed into
* tag/key/value at load-time rather than at read-value time.
*/
- bool LoadConf(FILE* &conf, const char* filename);
+ bool LoadConf(FILE* &conf, const char* filename, bool allowexeinc);
/** Load 'filename' into 'target', with the new config parser everything is parsed into
* tag/key/value at load-time rather than at read-value time.
*/
- bool LoadConf(FILE* &conf, const std::string &filename);
+ bool LoadConf(FILE* &conf, const std::string &filename, bool allowexeinc);
/** Writes 'length' chars into 'result' as a string
*/
* @param name Directory to tidy
* @return The cleaned filename
*/
- static char* CleanFilename(char* name);
+ static const char* CleanFilename(const char* name);
/** Check if a file exists.
* @param file The full path to a file