From 47dda4f61512f6047f2b1dcccd1943aab74726e3 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Sat, 10 Jan 2015 15:16:03 +0100 Subject: Reduce std::string::substr() usage substr() returns a new string while erase() and assign() modify the existing one --- src/modules/m_dccallow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/modules/m_dccallow.cpp') 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)) -- cgit v1.3.1-10-gc9f91