]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_noinvite.cpp
Hosts vector not cleared on rehash, made rehashing for changes impossible
[user/henk/code/inspircd.git] / src / modules / m_noinvite.cpp
index e174d244699140d69c16b7f8bd8b6164187e119b..efa0af0e10957763c236d0b21b79a8597f568935 100644 (file)
@@ -20,7 +20,7 @@ class NoInvite : public ModeHandler
  public:
        NoInvite(InspIRCd* Instance) : ModeHandler(Instance, 'V', 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)
                {
@@ -51,18 +51,18 @@ 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);
        }
 
 
-       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'))
                {
-                       user->WriteServ("492 %s %s :Can't invite %s to channel (+V set)",user->nick, channel->name, dest->nick);
+                       user->WriteNumeric(492, "%s %s :Can't invite %s to channel (+V set)",user->nick, channel->name, dest->nick);
                        return 1;
                }
                return 0;
@@ -76,7 +76,7 @@ class ModuleNoInvite : public Module
        
        virtual Version GetVersion()
        {
-               return Version(1,1,0,0,VF_COMMON|VF_VENDOR,API_VERSION);
+               return Version(1,2,0,0,VF_COMMON|VF_VENDOR,API_VERSION);
        }
 };