mirror of
https://github.com/anope/anope.git
synced 2026-06-30 02:36:38 +02:00
Fixed bugs #1146 and #1147 - Fixed check_modes to only apply defcon settings when defcon is actually on
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2841 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
@@ -27,6 +27,7 @@ Provided by Anope Dev. <team@anope.org> - 2009
|
||||
12/01 F Fixed tracking of users host when they disable their vhost [#1106]
|
||||
12/20 F Fixed nickcores access list being loaded from SQL with RDB [ #00]
|
||||
1/15 F Fixed BotServ from kicking and banning ULined clients [#1135]
|
||||
3/29 F Fixed defcon to only apply its mode parameters when it's on [#1146]
|
||||
|
||||
Provided by Han` <Han@mefalcon.org> - 2009
|
||||
07/28 F Updated german language file. [ #00]
|
||||
|
||||
+7
-6
@@ -1086,6 +1086,7 @@ void check_modes(Channel * c)
|
||||
ChannelInfo *ci;
|
||||
CBModeInfo *cbmi = NULL;
|
||||
CBMode *cbm = NULL;
|
||||
boolean DefConOn = DefConLevel != 5;
|
||||
|
||||
if (!c) {
|
||||
if (debug) {
|
||||
@@ -1131,7 +1132,7 @@ void check_modes(Channel * c)
|
||||
*/
|
||||
if (ci)
|
||||
modes = ~c->mode & ci->mlock_on;
|
||||
if (DefConModesSet)
|
||||
if (DefConOn && DefConModesSet)
|
||||
modes |= (~c->mode & DefConModesOn);
|
||||
|
||||
/* Initialize the buffers */
|
||||
@@ -1147,7 +1148,7 @@ void check_modes(Channel * c)
|
||||
if (cbmi->getvalue && cbmi->csgetvalue) {
|
||||
char *value;
|
||||
/* Check if it's a defcon or mlock mode */
|
||||
if (DefConModesOn & cbmi->flag)
|
||||
if (DefConOn && DefConModesOn & cbmi->flag)
|
||||
value = cbmi->csgetvalue(&DefConModesCI);
|
||||
else if (ci)
|
||||
value = cbmi->csgetvalue(ci);
|
||||
@@ -1168,13 +1169,13 @@ void check_modes(Channel * c)
|
||||
}
|
||||
} else if (cbmi->getvalue && cbmi->csgetvalue
|
||||
&& ((ci && (ci->mlock_on & cbmi->flag))
|
||||
|| (DefConModesOn & cbmi->flag))
|
||||
|| (DefConOn && DefConModesOn & cbmi->flag))
|
||||
&& (c->mode & cbmi->flag)) {
|
||||
char *value = cbmi->getvalue(c);
|
||||
char *csvalue;
|
||||
|
||||
/* Check if it's a defcon or mlock mode */
|
||||
if (DefConModesOn & cbmi->flag)
|
||||
if (DefConOn && DefConModesOn & cbmi->flag)
|
||||
csvalue = cbmi->csgetvalue(&DefConModesCI);
|
||||
else if (ci)
|
||||
csvalue = cbmi->csgetvalue(ci);
|
||||
@@ -1205,10 +1206,10 @@ void check_modes(Channel * c)
|
||||
if (ci) {
|
||||
modes = c->mode & ci->mlock_off;
|
||||
/* Make sure we don't remove a mode just set by defcon.. ~ Viper */
|
||||
if (DefConModesSet)
|
||||
if (DefConOn && DefConModesSet)
|
||||
modes &= ~(modes & DefConModesOn);
|
||||
}
|
||||
if (DefConModesSet)
|
||||
if (DefConOn && DefConModesSet)
|
||||
modes |= c->mode & DefConModesOff;
|
||||
|
||||
if (modes) {
|
||||
|
||||
+2
-1
@@ -9,10 +9,11 @@ VERSION_MAJOR="1"
|
||||
VERSION_MINOR="8"
|
||||
VERSION_PATCH="3"
|
||||
VERSION_EXTRA="-svn"
|
||||
VERSION_BUILD="2840"
|
||||
VERSION_BUILD="2841"
|
||||
|
||||
# $Log$ # Changes since 1.8.3 Release
|
||||
|
||||
#Revision 2841 - Fixed bugs #1146 and #1147 - Fixed check_modes to only apply defcon settings when defcon is actually on
|
||||
#Revision 2840 - Fixed bug #1144 - replaced some strcpy calls with strscpy to be safer
|
||||
#Revision 2837 - Log deleting and clearing XOP access lists
|
||||
#Revision 2836 - Document usage of the -protocoldebug option in services help
|
||||
|
||||
Reference in New Issue
Block a user