diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-11 01:35:01 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-11 01:35:01 +0000 |
commit | 12737ab4ad61a0d8a908c8a21594c7012e21eb3c (patch) | |
tree | bf819b3a528227d3ddf929e25e8b74d1db8ef1c7 /include | |
parent | b8383dcc9524ca832de7daf56f44fe54b19e5bdc (diff) |
ConfigReader and FileReader now take InspIRCd* to their constructors
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4865 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r-- | include/commands/cmd_stats.h | 2 | ||||
-rw-r--r-- | include/commands/cmd_whois.h | 2 | ||||
-rw-r--r-- | include/modules.h | 15 | ||||
-rw-r--r-- | include/u_listmode.h | 2 |
4 files changed, 10 insertions, 11 deletions
diff --git a/include/commands/cmd_stats.h b/include/commands/cmd_stats.h index 7e4cf905a..74cf86d4c 100644 --- a/include/commands/cmd_stats.h +++ b/include/commands/cmd_stats.h @@ -28,7 +28,7 @@ #include "users.h" #include "channels.h" -void DoStats(char statschar, userrec* user, string_list &results); +void DoStats(InspIRCd* Instance, char statschar, userrec* user, string_list &results); class cmd_stats : public command_t { diff --git a/include/commands/cmd_whois.h b/include/commands/cmd_whois.h index 5f44e3530..962444a82 100644 --- a/include/commands/cmd_whois.h +++ b/include/commands/cmd_whois.h @@ -28,7 +28,7 @@ #include "users.h" #include "channels.h" -void do_whois(userrec* user, userrec* dest,unsigned long signon, unsigned long idle, const char* nick); +void do_whois(InspIRCd* Instance, userrec* user, userrec* dest,unsigned long signon, unsigned long idle, const char* nick); class cmd_whois : public command_t { diff --git a/include/modules.h b/include/modules.h index 90c06361f..9ca7eab5e 100644 --- a/include/modules.h +++ b/include/modules.h @@ -188,9 +188,6 @@ class Version : public classbase class ModuleMessage : public classbase { public: - /** This class is pure virtual and must be inherited. - */ - virtual char* Send() = 0; virtual ~ModuleMessage() {}; }; @@ -294,7 +291,7 @@ class Event : public ModuleMessage * The return result of an Event::Send() will always be NULL as * no replies are expected. */ - char* Send(); + char* Send(InspIRCd* ServerInstance); }; /** This class can be used on its own to represent an exception, or derived to represent a module-specific exception. @@ -1258,6 +1255,7 @@ class Module : public Extensible class ConfigReader : public classbase { protected: + InspIRCd* ServerInstance; /** The contents of the configuration file * This protected member should never be accessed by a module (and cannot be accessed unless the * core is changed). It will contain a pointer to the configuration file data with unneeded data @@ -1276,11 +1274,11 @@ class ConfigReader : public classbase * This constructor initialises the ConfigReader class to read the inspircd.conf file * as specified when running ./configure. */ - ConfigReader(); // default constructor reads ircd.conf + ConfigReader(InspIRCd* Instance); /** Overloaded constructor. * This constructor initialises the ConfigReader class to read a user-specified config file */ - ConfigReader(const std::string &filename); // read a module-specific config + ConfigReader(InspIRCd* Instance, const std::string &filename); /** Default destructor. * This method destroys the ConfigReader class. */ @@ -1347,6 +1345,7 @@ class ConfigReader : public classbase */ class FileReader : public classbase { + InspIRCd* ServerInstance; /** The file contents */ file_cache fc; @@ -1360,14 +1359,14 @@ class FileReader : public classbase * This method does not load any file into memory, you must use the LoadFile method * after constructing the class this way. */ - FileReader(); + FileReader(InspIRCd* Instance); /** Secondary constructor. * This method initialises the class with a file loaded into it ready for GetLine and * and other methods to be called. If the file could not be loaded, FileReader::FileSize * returns 0. */ - FileReader(const std::string &filename); + FileReader(InspIRCd* Instance, const std::string &filename); /** Default destructor. * This deletes the memory allocated to the file. diff --git a/include/u_listmode.h b/include/u_listmode.h index bd5bde74c..ed27d15ea 100644 --- a/include/u_listmode.h +++ b/include/u_listmode.h @@ -101,7 +101,7 @@ class ListModeBase : public ModeHandler virtual void DoRehash() { - ConfigReader Conf; + ConfigReader Conf(ServerInstance); chanlimits.clear(); |