X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_permchannels.cpp;h=7fdc12f882ebb69e48725a7e874ea58f85fbc8a7;hb=9336468f5bfa60318cb57db5126047147b7a21cb;hp=60d2ec248671780eb3a1b3eba597b769ee8e6372;hpb=7d93921aabd9c608821baec8a871aff844dfae49;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp index 60d2ec248..7fdc12f88 100644 --- a/src/modules/m_permchannels.cpp +++ b/src/modules/m_permchannels.cpp @@ -110,7 +110,7 @@ static bool WriteDatabase() class PermChannel : public ModeHandler { public: - PermChannel(InspIRCd* Instance, Module* Creator) : ModeHandler(Creator, 'P', PARAM_NONE, MODETYPE_CHANNEL) { } + PermChannel(Module* Creator) : ModeHandler(Creator, 'P', PARAM_NONE, MODETYPE_CHANNEL) { } ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { @@ -135,7 +135,7 @@ class PermChannel : public ModeHandler { if (channel->IsModeSet('P')) { - if (channel->GetUserCounter() == 0 && !IS_FAKE(source)) + if (channel->GetUserCounter() == 0 && !IS_SERVER(source)) { /* * ugh, ugh, UGH! @@ -175,7 +175,7 @@ class ModulePermanentChannels : public Module PermChannel p; public: - ModulePermanentChannels(InspIRCd* Me) : Module(Me), p(Me, this) + ModulePermanentChannels() : p(this) { if (!ServerInstance->Modes->AddMode(&p)) throw ModuleException("Could not add new modes!"); @@ -187,7 +187,6 @@ public: virtual ~ModulePermanentChannels() { - ServerInstance->Modes->DelMode(&p); /* * DelMode can't remove the +P mode on empty channels, or it will break * merging modes with remote servers. Remove the empty channels now as @@ -215,7 +214,7 @@ public: * Process config-defined list of permanent channels. * -- w00t */ - ConfigReader MyConf(ServerInstance); + ConfigReader MyConf; permchannelsconf = MyConf.ReadValue("permchanneldb", "filename", "", 0, false); @@ -235,7 +234,7 @@ public: if (!c) { - c = new Channel(ServerInstance, channel, ServerInstance->Time()); + c = new Channel(channel, ServerInstance->Time()); if (!topic.empty()) { c->SetTopic(NULL, topic, true);