]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Added OnSyncUser, OnSyncChannel, ProtoSendMode
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Wed, 30 Nov 2005 22:05:45 +0000 (22:05 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Wed, 30 Nov 2005 22:05:45 +0000 (22:05 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2070 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_chanfilter.cpp
src/modules/m_chanprotect.cpp

index 9f1722b8d97ee7fb9810568965f82fd96e2be590..3db636b3577e1736a82651015e438df99dea1c2f 100644 (file)
@@ -208,7 +208,7 @@ class ModuleChanFilter : public Module
                return Version(1,0,0,0,VF_STATIC|VF_VENDOR);
        }
        
-       virtual string_list OnChannelSync(chanrec* chan)
+       virtual void OnSyncChannel(chanrec* chan, Module* proto, void* opaque)
        {
                SpamList* spamlist = (SpamList*)chan->GetExt("spam_list");
                string_list commands;
@@ -216,7 +216,7 @@ class ModuleChanFilter : public Module
                {
                        for (SpamList::iterator i = spamlist->begin(); i != spamlist->end(); i++)
                        {
-                               commands.push_back("M "+std::string(chan->name)+" +g "+*i);
+                               proto->ProtoSendMode(opaque,TYPE_CHANNEL,chan,"+g "+*i);
                        }
                }
                return commands;
index 0938dacb0a3d1451d8ad36e473e09641fb129fb7..325a50a130cabb6dc408722133e386ea702b9620 100644 (file)
@@ -335,7 +335,7 @@ class ModuleChanProtect : public Module
                return Version(1,0,0,0,VF_STATIC|VF_VENDOR);
        }
        
-       virtual string_list OnChannelSync(chanrec* chan)
+       virtual void OnChannelSync(chanrec* chan, Module* proto, void* opaque)
        {
                // this is called when the server is linking into a net and wants to sync channel data.
                // we should send our mode changes for the channel here to ensure that other servers
@@ -346,11 +346,11 @@ class ModuleChanProtect : public Module
                {
                        if (cl[i]->GetExt("cm_founder_"+std::string(chan->name)))
                        {
-                               commands.push_back("M "+std::string(chan->name)+" +q "+std::string(cl[i]->nick));
+                               proto->ProtoSendMode(opaque,TYPE_CHANNEL,chan,"+q "+std::string(cl[i]->nick));
                        }
                        if (cl[i]->GetExt("cm_protect_"+std::string(chan->name)))
                        {
-                               commands.push_back("M "+std::string(chan->name)+" +a "+std::string(cl[i]->nick));
+                               proto->ProtoSendMode(opaque,TYPE_CHANNEL,chan,"+a "+std::string(cl[i]->nick));
                        }
                }
                return commands;