]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_noinvite.cpp
Commit patch from danieldg that makes a ton of stuff const-safe for latest warn-happy...
[user/henk/code/inspircd.git] / src / modules / m_noinvite.cpp
index 1d970f110b054d9a803f2bdaf5f5b373b7c2844e..cff191db061eb5b4b4c6dce90641ab5418ddff06 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
@@ -51,18 +51,14 @@ class ModuleNoInvite : public Module
        ModuleNoInvite(InspIRCd* Me) : Module(Me)
        {
                ni = new NoInvite(ServerInstance);
-               if (!ServerInstance->AddMode(ni))
+               if (!ServerInstance->Modes->AddMode(ni))
                        throw ModuleException("Could not add new modes!");
                Implementation eventlist[] = { I_OnUserPreInvite };
                ServerInstance->Modules->Attach(eventlist, this, 1);
        }
 
-       void Implements(char* List)
-       {
-               List[I_OnUserPreInvite] = 1;
-       }
 
-       virtual int OnUserPreInvite(User* user,User* dest,Channel* channel)
+       virtual int OnUserPreInvite(User* user,User* dest,Channel* channel, time_t timeout)
        {
                if (channel->IsModeSet('V'))
                {
@@ -75,7 +71,7 @@ class ModuleNoInvite : public Module
        virtual ~ModuleNoInvite()
        {
                ServerInstance->Modes->DelMode(ni);
-               DELETE(ni);
+               delete ni;
        }
        
        virtual Version GetVersion()