summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-02-16 15:25:04 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-02-16 15:25:04 +0000
commit9228c006f98afa98d0f77d7ed3c6bdf79836e9d1 (patch)
tree266fdecbdc8bfd4058b1b9c801741b0bf82313bd /src/modules
parent1e60a6639e4cff2f1b022c8973e164636f3857f2 (diff)
Delete 0-user permanent channels that are being set -P
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12475 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_permchannels.cpp25
1 files changed, 3 insertions, 22 deletions
diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp
index 5d8b0c6e7..3b8e5e43c 100644
--- a/src/modules/m_permchannels.cpp
+++ b/src/modules/m_permchannels.cpp
@@ -126,30 +126,11 @@ class PermChannel : public ModeHandler
{
if (channel->IsModeSet('P'))
{
- if (channel->GetUserCounter() == 0 && !IS_SERVER(source))
+ channel->SetMode(this,false);
+ if (channel->GetUserCounter() == 0)
{
- /*
- * ugh, ugh, UGH!
- *
- * We can't delete this channel the way things work at the moment,
- * because of the following scenario:
- * s1:#c <-> s2:#c
- *
- * s1 has a user in #c, s2 does not. s2 has +P set. s2 has a losing TS.
- *
- * On netmerge, s2 loses, so s2 removes all modes (including +P) which
- * would subsequently delete the channel here causing big fucking problems.
- *
- * I don't think there's really a way around this, so just deny -P on a 0 user chan.
- * -- w00t
- *
- * delete channel;
- */
- return MODEACTION_DENY;
+ channel->DelUser(ServerInstance->FakeClient);
}
-
- /* for servers, remove +P (to avoid desyncs) but don't bother trying to delete. */
- channel->SetMode('P',false);
return MODEACTION_ALLOW;
}
}