diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/configreader.cpp | 1 | ||||
-rw-r--r-- | src/coremods/core_whois.cpp | 11 |
2 files changed, 10 insertions, 2 deletions
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 |