summaryrefslogtreecommitdiff
path: root/src/commands/cmd_notice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/cmd_notice.cpp')
-rw-r--r--src/commands/cmd_notice.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/commands/cmd_notice.cpp b/src/commands/cmd_notice.cpp
index 5086f3f4f..9cf4800a4 100644
--- a/src/commands/cmd_notice.cpp
+++ b/src/commands/cmd_notice.cpp
@@ -130,8 +130,9 @@ CmdResult CommandNotice::Handle (const std::vector<std::string>& parameters, Use
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))
{