- ModuleXLineDB() {
- Implementation eventlist[] = { I_OnAddLine, I_OnDelLine, I_OnExpireLine };
- ServerInstance->Modules->Attach(eventlist, this, 3);
+ void init() CXX11_OVERRIDE
+ {
+ /* Load the configuration
+ * Note:
+ * This is on purpose not changed on a rehash. It would be non-trivial to change the database on-the-fly.
+ * Imagine a scenario where the new file already exists. Merging the current XLines with the existing database is likely a bad idea
+ * ...and so is discarding all current in-memory XLines for the ones in the database.
+ */
+ ConfigTag* Conf = ServerInstance->Config->ConfValue("xlinedb");
+ xlinedbpath = ServerInstance->Config->Paths.PrependData(Conf->getString("filename", "xline.db"));