aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_operchans.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-01-24 06:33:33 +0000
committerGravatar Sadie Powell2023-01-24 06:34:44 +0000
commit704d2c5da0403fb9a503c6c34bb3a466c600e5f4 (patch)
treef938c3f4946aacdd6f1114d3810c441238148d3d /src/modules/m_operchans.cpp
parentDocument how users should enable extra modules better. (diff)
Slim down stdalgo by removing unused and duplicate functions.
Diffstat (limited to 'src/modules/m_operchans.cpp')
-rw-r--r--src/modules/m_operchans.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/modules/m_operchans.cpp b/src/modules/m_operchans.cpp
index f5ed14e09..c76754b75 100644
--- a/src/modules/m_operchans.cpp
+++ b/src/modules/m_operchans.cpp
@@ -35,15 +35,9 @@ enum
class OperExtBan final
: public ExtBan::MatchingBase
{
-private:
- std::string space;
- std::string underscore;
-
public:
OperExtBan(Module* Creator)
: ExtBan::MatchingBase(Creator, "oper", 'O')
- , space(" ")
- , underscore("_")
{
}
@@ -55,7 +49,7 @@ public:
// Replace spaces with underscores as they're prohibited in mode parameters.
std::string opername(user->oper->GetType());
- stdalgo::string::replace_all(opername, space, underscore);
+ std::replace(opername.begin(), opername.end(), ' ', '_');
return InspIRCd::Match(opername, text);
}
};