From 7d7250484c352c13830e63ae41ee8faae40a9bd5 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 25 May 2008 17:30:43 +0000 Subject: First phase of conversion to dynamic limits on all the lengths, configured via the tag (the tag isnt there yet, these all just run on defaults in the class constructor) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9802 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/commands/cmd_privmsg.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/commands/cmd_privmsg.cpp') 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& 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)) { -- cgit v1.2.3