aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_silence.cpp
diff options
context:
space:
mode:
authorGravatar Attila Molnar2015-01-10 15:16:03 +0100
committerGravatar Attila Molnar2015-01-10 15:16:03 +0100
commit47dda4f61512f6047f2b1dcccd1943aab74726e3 (patch)
treea1425a9dbff58b97ef5dcdf169e0d65439513527 /src/modules/m_silence.cpp
parentRemove the unused OnGlobalOper hook (diff)
Reduce std::string::substr() usage
substr() returns a new string while erase() and assign() modify the existing one
Diffstat (limited to 'src/modules/m_silence.cpp')
-rw-r--r--src/modules/m_silence.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/m_silence.cpp b/src/modules/m_silence.cpp
index 7298d77e1..22de0ac8b 100644
--- a/src/modules/m_silence.cpp
+++ b/src/modules/m_silence.cpp
@@ -134,7 +134,7 @@ class CommandSilence : public Command
else if (parameters.size() > 0)
{
// one or more parameters, add or delete entry from the list (only the first parameter is used)
- std::string mask = parameters[0].substr(1);
+ std::string mask(parameters[0], 1);
char action = parameters[0][0];
// Default is private and notice so clients do not break
int pattern = CompilePattern("pn");