]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_permchannels.cpp
Change IS_FAKE and CheckTimeStamp to IS_SERVER and ResolveModeConflict to clarify...
[user/henk/code/inspircd.git] / src / modules / m_permchannels.cpp
index 60d2ec248671780eb3a1b3eba597b769ee8e6372..a409078e4ab29eb5c41bb940ae156e6ede168c34 100644 (file)
@@ -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 &parameter, 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!");
@@ -215,7 +215,7 @@ public:
                 * Process config-defined list of permanent channels.
                 * -- w00t
                 */
-               ConfigReader MyConf(ServerInstance);
+               ConfigReader MyConf;
 
                permchannelsconf = MyConf.ReadValue("permchanneldb", "filename", "", 0, false);
 
@@ -235,7 +235,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);