summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-06-12 16:30:32 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-06-12 16:30:32 +0000
commita09c6eb1ce2b91299137c42ff65d3e57468d3672 (patch)
tree913e0ffe9bd1320bb6e468a6641172d66bb4f5c8
parent098776a681b1bd50a16775c604a3d0a746807e2c (diff)
Fix advertising of +h/% in 005 and 004 numerics when halfops are not enabled in the conf, spotted by Smartys, fixes bug #322
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7282 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/mode.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index c38874229..14dd39b33 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -783,6 +783,9 @@ std::string ModeParser::ChannelModeList()
for (unsigned char mode = 'A'; mode <= 'z'; mode++)
{
+ if ((!ServerInstance->Config->AllowHalfop) && (mode == 'h'))
+ continue;
+
unsigned char pos = (mode-65) | MASK_CHANNEL;
if (modehandlers[pos])
@@ -799,6 +802,9 @@ std::string ModeParser::ParaModeList()
for (unsigned char mode = 'A'; mode <= 'z'; mode++)
{
+ if ((!ServerInstance->Config->AllowHalfop) && (mode == 'h'))
+ continue;
+
unsigned char pos = (mode-65) | MASK_CHANNEL;
if ((modehandlers[pos]) && (modehandlers[pos]->GetNumParams(true)))
@@ -859,6 +865,9 @@ std::string ModeParser::ChanModes()
for (unsigned char mode = 'A'; mode <= 'z'; mode++)
{
+ if ((!ServerInstance->Config->AllowHalfop) && (mode == 'h'))
+ continue;
+
unsigned char pos = (mode-65) | MASK_CHANNEL;
/* One parameter when adding */
if (modehandlers[pos])
@@ -912,6 +921,9 @@ std::string ModeParser::BuildPrefixes()
for (unsigned char mode = 'A'; mode <= 'z'; mode++)
{
+ if ((!ServerInstance->Config->AllowHalfop) && (mode == 'h'))
+ continue;
+
unsigned char pos = (mode-65) | MASK_CHANNEL;
if ((modehandlers[pos]) && (modehandlers[pos]->GetPrefix()))