mirror of
https://github.com/znc/znc.git
synced 2026-08-06 17:03:14 +02:00
Fix chansaver loading
CModules::LoadModule() sets the module type _after_ construction. The constructor cannot therefore do actions based on the module type. Move loading to OnLoad().
This commit is contained in:
@@ -21,6 +21,12 @@
|
||||
class CChanSaverMod : public CModule {
|
||||
public:
|
||||
MODCONSTRUCTOR(CChanSaverMod) {
|
||||
}
|
||||
|
||||
virtual ~CChanSaverMod() {
|
||||
}
|
||||
|
||||
bool OnLoad(const CString& sArgsi, CString& sMessage) override {
|
||||
switch (GetType()) {
|
||||
case CModInfo::GlobalModule:
|
||||
LoadUsers();
|
||||
@@ -32,9 +38,7 @@ public:
|
||||
LoadNetwork(GetNetwork());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
virtual ~CChanSaverMod() {
|
||||
return true;
|
||||
}
|
||||
|
||||
void LoadUsers() {
|
||||
|
||||
Reference in New Issue
Block a user