aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_helpmode.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-02-27 21:47:11 +0000
committerGravatar Sadie Powell2023-02-27 21:47:32 +0000
commit2597dcd15343106aa48fa5956eefe3f36209d6b3 (patch)
tree984497b3044e39d2f8b911094ba51340b16bc8a7 /src/modules/m_helpmode.cpp
parentAllow user mode +h (helpop) to override +H (hideoper) in /STATS P. (diff)
Refer to users with +h (helpop) as helpers not (help)opers.
Diffstat (limited to 'src/modules/m_helpmode.cpp')
-rw-r--r--src/modules/m_helpmode.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/modules/m_helpmode.cpp b/src/modules/m_helpmode.cpp
index acc48e423..ee08a121c 100644
--- a/src/modules/m_helpmode.cpp
+++ b/src/modules/m_helpmode.cpp
@@ -26,7 +26,7 @@ class HelpOp final
: public SimpleUserMode
{
public:
- std::vector<User*> helpopers;
+ std::vector<User*> helpers;
HelpOp(Module* mod)
: SimpleUserMode(mod, "helpop", 'h', true)
@@ -39,9 +39,9 @@ public:
return false;
if (change.adding)
- helpopers.push_back(dest);
+ helpers.push_back(dest);
else
- stdalgo::erase(helpopers, dest);
+ stdalgo::erase(helpers, dest);
return true;
}
@@ -78,33 +78,33 @@ public:
if (stats.GetSymbol() != 'P')
return MOD_RES_PASSTHRU;
- for (auto* oper : helpop.helpopers)
+ for (auto* helper : helpop.helpers)
{
- if (oper->server->IsService())
+ if (helper->server->IsService())
continue; // Ignore services.
- if (oper->IsOper() && (!ignorehideoper || !oper->IsModeSet(hideoper)))
- continue; // Ignore opers.
+ if (helper->IsOper() && (!ignorehideoper || !helper->IsModeSet(hideoper)))
+ continue; // Ignore helpers.
std::string extra;
- if (oper->IsAway())
+ if (helper->IsAway())
{
- const std::string awayperiod = Duration::ToString(ServerInstance->Time() - oper->awaytime);
- const std::string awaytime = InspIRCd::TimeString(oper->awaytime);
+ const std::string awayperiod = Duration::ToString(ServerInstance->Time() - helper->awaytime);
+ const std::string awaytime = InspIRCd::TimeString(helper->awaytime);
- extra = INSP_FORMAT(": away for {} [since {}] ({})", awayperiod, awaytime, oper->awaymsg);
+ extra = INSP_FORMAT(": away for {} [since {}] ({})", awayperiod, awaytime, helper->awaymsg);
}
- auto* loper = IS_LOCAL(oper);
- if (loper)
+ auto* lhelper = IS_LOCAL(helper);
+ if (lhelper)
{
- const std::string idleperiod = Duration::ToString(ServerInstance->Time() - loper->idle_lastmsg);
- const std::string idletime = InspIRCd::TimeString(loper->idle_lastmsg);
+ const std::string idleperiod = Duration::ToString(ServerInstance->Time() - lhelper->idle_lastmsg);
+ const std::string idletime = InspIRCd::TimeString(lhelper->idle_lastmsg);
extra += INSP_FORMAT("{} idle for {} [since {}]", extra.empty() ? ':' : ',', idleperiod, idletime);
}
- stats.AddGenericRow(INSP_FORMAT("\x02{}\x02 ({}){}", oper->nick, oper->GetRealUserHost(), extra));
+ stats.AddGenericRow(INSP_FORMAT("\x02{}\x02 ({}){}", helper->nick, helper->GetRealUserHost(), extra));
}
// Allow the core to add normal opers.