summaryrefslogtreecommitdiff
path: root/src/modules/m_dccallow.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2015-01-10 15:16:03 +0100
committerAttila Molnar <attilamolnar@hush.com>2015-01-10 15:16:03 +0100
commit47dda4f61512f6047f2b1dcccd1943aab74726e3 (patch)
treea1425a9dbff58b97ef5dcdf169e0d65439513527 /src/modules/m_dccallow.cpp
parentae10286658d6bb70e5e22526a004ec1b233f6fba (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_dccallow.cpp')
-rw-r--r--src/modules/m_dccallow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp
index 1b838be5c..7627ba8c7 100644
--- a/src/modules/m_dccallow.cpp
+++ b/src/modules/m_dccallow.cpp
@@ -101,7 +101,7 @@ class CommandDccallow : public Command
}
}
- std::string nick = parameters[0].substr(1);
+ std::string nick(parameters[0], 1);
User *target = ServerInstance->FindNickOnly(nick);
if ((target) && (!IS_SERVER(target)) && (!target->quitting) && (target->registered == REG_ALL))