summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/configreader.h6
-rw-r--r--src/configreader.cpp1
-rw-r--r--src/coremods/core_whois.cpp11
3 files changed, 10 insertions, 8 deletions
diff --git a/include/configreader.h b/include/configreader.h
index 5d99bd843..be7d8c7e0 100644
--- a/include/configreader.h
+++ b/include/configreader.h
@@ -344,12 +344,6 @@ class CoreExport ServerConfig
*/
std::bitset<64> DisabledCModes;
- /** If set to true, then all opers on this server are
- * shown with a generic 'is an IRC operator' line rather
- * than the oper type. Oper types are still used internally.
- */
- bool GenericOper;
-
/** How to treat a user in a channel who is banned. */
BannedUserTreatment RestrictBannedUsers;
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 18cfe032f..5399baa17 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -412,7 +412,6 @@ void ServerConfig::Fill()
HideSplits = security->getBool("hidesplits");
HideBans = security->getBool("hidebans");
HideServer = security->getString("hideserver", security->getString("hidewhois"));
- GenericOper = security->getBool("genericoper");
SyntaxHints = options->getBool("syntaxhints");
FullHostInTopic = options->getBool("hostintopic");
MaxTargets = security->getUInt("maxtargets", 20, 1, 31);
diff --git a/src/coremods/core_whois.cpp b/src/coremods/core_whois.cpp
index 7fbaf2226..455260051 100644
--- a/src/coremods/core_whois.cpp
+++ b/src/coremods/core_whois.cpp
@@ -88,8 +88,14 @@ class CommandWhois : public SplitCommand
void SendChanList(WhoisContextImpl& whois);
public:
+ /** If true then all opers are shown with a generic 'is an IRC operator' line rather than the oper type. */
+ bool genericoper;
+
+ /** How to handle private/secret channels in the WHOIS response. */
SplitWhoisState splitwhois;
+
+
/** Constructor for whois.
*/
CommandWhois(Module* parent)
@@ -235,7 +241,7 @@ void CommandWhois::DoWhois(LocalUser* user, User* dest, time_t signon, unsigned
if (dest->IsOper())
{
- if (ServerInstance->Config->GenericOper)
+ if (genericoper)
whois.SendLine(RPL_WHOISOPERATOR, "is an IRC operator");
else
whois.SendLine(RPL_WHOISOPERATOR, InspIRCd::Format("is %s %s on %s", (strchr("AEIOUaeiou",dest->oper->name[0]) ? "an" : "a"), dest->oper->name.c_str(), ServerInstance->Config->Network.c_str()));
@@ -359,6 +365,9 @@ class CoreModWhois : public Module
cmd.splitwhois = SPLITWHOIS_SPLITMSG;
else
throw ModuleException(splitwhois + " is an invalid <security:splitwhois> value, at " + tag->getTagLocation());
+
+ ConfigTag* security = ServerInstance->Config->ConfValue("security");
+ cmd.genericoper = security->getBool("genericoper");
}
Version GetVersion() CXX11_OVERRIDE