]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cmd_nick.cpp
Added example conf
[user/henk/code/inspircd.git] / src / cmd_nick.cpp
index 4f5b962b9f25c6bfaf347e5ad1bfd430d4179671..518d600f19c956b2b0fe6f2c91c252f4559311cf 100644 (file)
@@ -153,7 +153,7 @@ void cmd_nick::Handle (char **parameters, int pcnt, userrec *user)
                
        }
 
-       strlcpy(oldnick,user->nick,NICKMAX);
+       strlcpy(oldnick, user->nick, NICKMAX - 1);
 
        /* change the nick of the user in the users_hash */
        user = ReHashNick(user->nick, parameters[0]);
@@ -161,7 +161,7 @@ void cmd_nick::Handle (char **parameters, int pcnt, userrec *user)
        if (!user) return;
        if (!user->nick) return;
 
-       strlcpy(user->nick, parameters[0],NICKMAX);
+       strlcpy(user->nick, parameters[0], NICKMAX - 1);
 
        log(DEBUG,"new nick set: %s",user->nick);