summaryrefslogtreecommitdiff
path: root/src/commands/cmd_privmsg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/cmd_privmsg.cpp')
-rw-r--r--src/commands/cmd_privmsg.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/commands/cmd_privmsg.cpp b/src/commands/cmd_privmsg.cpp
index 842635ae2..0086bb72d 100644
--- a/src/commands/cmd_privmsg.cpp
+++ b/src/commands/cmd_privmsg.cpp
@@ -132,8 +132,9 @@ CmdResult CommandPrivmsg::Handle (const std::vector<std::string>& parameters, Us
if (targetserver)
{
- char nickonly[NICKMAX+1];
- strlcpy(nickonly, destnick, targetserver - destnick + 1);
+ std::string nickonly;
+
+ nickonly.assign(destnick, 0, targetserver - destnick + 1);
dest = ServerInstance->FindNickOnly(nickonly);
if (dest && strcasecmp(dest->server, targetserver + 1))
{