} \
catch (ModuleException& modexcept) \
{ \
- log(DEBUG,"Module exception caught: %s",modexcept.GetReason()); \
+ ServerInstance->Log(DEBUG,"Module exception caught: %s",modexcept.GetReason()); \
} \
} \
}
} \
catch (ModuleException& modexcept) \
{ \
- log(DEBUG,"Module exception caught: %s",modexcept.GetReason()); \
+ z->Log(DEBUG,"Module exception caught: %s",modexcept.GetReason()); \
} \
} \
}
} \
catch (ModuleException& modexcept) \
{ \
- log(DEBUG,"Module exception cought: %s",modexcept.GetReason()); \
+ ServerInstance->Log(DEBUG,"Module exception cought: %s",modexcept.GetReason()); \
} \
} \
} \
} \
catch (ModuleException& modexcept) \
{ \
- log(DEBUG,"Module exception cought: %s",modexcept.GetReason()); \
+ z->Log(DEBUG,"Module exception cought: %s",modexcept.GetReason()); \
} \
} \
} \
class ModuleMessage : public classbase
{
public:
- /** This class is pure virtual and must be inherited.
- */
- virtual char* Send() = 0;
virtual ~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.
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
* 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.
*/
*/
class FileReader : public classbase
{
+ InspIRCd* ServerInstance;
/** The file contents
*/
file_cache fc;
* 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.