]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sslmodes.cpp
Add 906, sasl aborted
[user/henk/code/inspircd.git] / src / modules / m_sslmodes.cpp
index 0cdb606979255fedd02c001d3ec52497499e3830..8ec346db25bd07476fe2a70b2ae93aab466f3709 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
  * This program is free but copyrighted software; see
@@ -24,7 +24,7 @@ class SSLMode : public ModeHandler
  public:
        SSLMode(InspIRCd* Instance) : ModeHandler(Instance, 'z', 0, 0, false, MODETYPE_CHANNEL, false) { }
 
-       ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
+       ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding, bool)
        {
                if (adding)
                {
@@ -75,14 +75,12 @@ class ModuleSSLModes : public Module
                
 
                sslm = new SSLMode(ServerInstance);
-               if (!ServerInstance->AddMode(sslm))
+               if (!ServerInstance->Modes->AddMode(sslm))
                        throw ModuleException("Could not add new modes!");
+               Implementation eventlist[] = { I_OnUserPreJoin };
+               ServerInstance->Modules->Attach(eventlist, this, 1);
        }
 
-       void Implements(char* List)
-       {
-               List[I_OnUserPreJoin] = 1;
-       }
 
        virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
        {
@@ -107,7 +105,7 @@ class ModuleSSLModes : public Module
        virtual ~ModuleSSLModes()
        {
                ServerInstance->Modes->DelMode(sslm);
-               DELETE(sslm);
+               delete sslm;
        }
        
        virtual Version GetVersion()