]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sslmodes.cpp
Include untranslated user/channel metadata in CHECK output
[user/henk/code/inspircd.git] / src / modules / m_sslmodes.cpp
index bc50ff5102df5b79c97bc4bd958e310a65b7ffc7..ccedd5aa29c56ca3f1434db31460039d1c3061ef 100644 (file)
@@ -2,8 +2,8 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
@@ -37,7 +37,7 @@ class SSLMode : public ModeHandler
                                        {
                                                if(!i->first->GetExt("ssl", dummy) && !ServerInstance->ULine(i->first->server))
                                                {
-                                                       source->WriteNumeric(490, "%s %s :all members of the channel must be connected via SSL", source->nick.c_str(), channel->name.c_str());
+                                                       source->WriteNumeric(ERR_ALLMUSTSSL, "%s %s :all members of the channel must be connected via SSL", source->nick.c_str(), channel->name.c_str());
                                                        return MODEACTION_DENY;
                                                }
                                        }
@@ -66,16 +66,13 @@ class SSLMode : public ModeHandler
 class ModuleSSLModes : public Module
 {
 
-       SSLMode* sslm;
+       SSLMode sslm;
 
  public:
        ModuleSSLModes(InspIRCd* Me)
-               : Module(Me)
+               : Module(Me), sslm(Me)
        {
-
-
-               sslm = new SSLMode(ServerInstance);
-               if (!ServerInstance->Modes->AddMode(sslm))
+               if (!ServerInstance->Modes->AddMode(&sslm))
                        throw ModuleException("Could not add new modes!");
                Implementation eventlist[] = { I_OnUserPreJoin };
                ServerInstance->Modules->Attach(eventlist, this, 1);
@@ -104,13 +101,12 @@ class ModuleSSLModes : public Module
 
        virtual ~ModuleSSLModes()
        {
-               ServerInstance->Modes->DelMode(sslm);
-               delete sslm;
+               ServerInstance->Modes->DelMode(&sslm);
        }
 
        virtual Version GetVersion()
        {
-               return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
+               return Version("$Id$", VF_COMMON | VF_VENDOR, API_VERSION);
        }
 };