summaryrefslogtreecommitdiff
path: root/src/coremods
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2018-10-01 16:35:00 +0100
committerPeter Powell <petpow@saberuk.com>2018-10-01 17:26:22 +0100
commitff5fdd21c161f8fec055fa93f7d460e1e83b9658 (patch)
treeec209a8d89cb10231172b7a084a8906ae523f0af /src/coremods
parent9ddb9cc6584c1f595ebbf95cf1b3630984733b25 (diff)
Move <security:genericoper> into core_whois.
Diffstat (limited to 'src/coremods')
-rw-r--r--src/coremods/core_whois.cpp11
1 files changed, 10 insertions, 1 deletions
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