summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-24 10:50:10 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-24 10:50:10 +0000
commitcde8b0f39c56e043487cc138e1fbea6fc78d24c8 (patch)
tree10d5650a8bf13837f618558a875b7255bc01846b /src
parente2f7117e87b84b4e609189643e393cc840db0734 (diff)
Dont send explicit FMODE +qa when qaprefixes is on (because its sent in the fjoin implicitly)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5315 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_chanprotect.cpp35
1 files changed, 21 insertions, 14 deletions
diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp
index 2f384f001..0ceb1fd3f 100644
--- a/src/modules/m_chanprotect.cpp
+++ b/src/modules/m_chanprotect.cpp
@@ -454,22 +454,29 @@ class ModuleChanProtect : public Module
virtual void OnSyncChannel(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
- // know whos +q/+a on the channel.
- CUList* cl = chan->GetUsers();
- string_list commands;
- std::string founder = "cm_founder_"+std::string(chan->name);
- std::string protect = "cm_protect_"+std::string(chan->name);
- for (CUList::iterator i = cl->begin(); i != cl->end(); i++)
+ /* NOTE: If +qa prefix is on, this is propogated by the channel join,
+ * so we dont need to propogate it manually
+ */
+ if (!QAPrefixes)
{
- if (i->second->GetExt(founder,dummyptr))
- {
- proto->ProtoSendMode(opaque,TYPE_CHANNEL,chan,"+q "+std::string(i->second->nick));
- }
- if (i->second->GetExt(protect,dummyptr))
+ // 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
+ // know whos +q/+a on the channel.
+ CUList* cl = chan->GetUsers();
+ string_list commands;
+ std::string founder = "cm_founder_"+std::string(chan->name);
+ std::string protect = "cm_protect_"+std::string(chan->name);
+ for (CUList::iterator i = cl->begin(); i != cl->end(); i++)
{
- proto->ProtoSendMode(opaque,TYPE_CHANNEL,chan,"+a "+std::string(i->second->nick));
+ if (i->second->GetExt(founder,dummyptr))
+ {
+ proto->ProtoSendMode(opaque,TYPE_CHANNEL,chan,"+q "+std::string(i->second->nick));
+ }
+ if (i->second->GetExt(protect,dummyptr))
+ {
+ proto->ProtoSendMode(opaque,TYPE_CHANNEL,chan,"+a "+std::string(i->second->nick));
+
+ }
}
}
}