]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sslmodes.cpp
Change httpd modules to use the MODNAME constant in headers.
[user/henk/code/inspircd.git] / src / modules / m_sslmodes.cpp
index 65933cc141126a265f21a2c1bbcbfa987669fe5b..1d29bb5e137333b1c2f73ffe2772fc20b3b58f33 100644 (file)
@@ -24,8 +24,6 @@
 #include "inspircd.h"
 #include "modules/ssl.h"
 
-/* $ModDesc: Provides channel mode +z to allow for Secure/SSL only channels */
-
 /** Handle channel mode +z
  */
 class SSLMode : public ModeHandler
@@ -43,7 +41,7 @@ class SSLMode : public ModeHandler
        {
                if (adding)
                {
-                       if (!channel->IsModeSet('z'))
+                       if (!channel->IsModeSet(this))
                        {
                                if (IS_LOCAL(source))
                                {
@@ -61,7 +59,7 @@ class SSLMode : public ModeHandler
                                                }
                                        }
                                }
-                               channel->SetMode('z',true);
+                               channel->SetMode(this, true);
                                return MODEACTION_ALLOW;
                        }
                        else
@@ -71,9 +69,9 @@ class SSLMode : public ModeHandler
                }
                else
                {
-                       if (channel->IsModeSet('z'))
+                       if (channel->IsModeSet(this))
                        {
-                               channel->SetMode('z',false);
+                               channel->SetMode(this, false);
                                return MODEACTION_ALLOW;
                        }
 
@@ -102,7 +100,7 @@ class ModuleSSLModes : public Module
 
        ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven) CXX11_OVERRIDE
        {
-               if(chan && chan->IsModeSet('z'))
+               if(chan && chan->IsModeSet(sslm))
                {
                        if (!sslm.API)
                                return MOD_RES_DENY;