From b1672e3514c5f17e2d32699e3bb3398e6a63e971 Mon Sep 17 00:00:00 2001 From: w00t Date: Wed, 30 Nov 2005 06:31:22 +0000 Subject: Merged an strcpy() and strlcat() -- looks nicer. Yeah, incredibly minor. Also noted possible problem. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2024 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/commands.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/commands.cpp b/src/commands.cpp index c1b7ce82e..e6896e3a7 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -1123,8 +1123,11 @@ void handle_user(char **parameters, int pcnt, userrec *user) WriteServ(user->fd,"461 %s USER :Not enough parameters",user->nick); } else { - strcpy(user->ident,"~"); /* we arent checking ident... but these days why bother anyway? */ - strlcat(user->ident,parameters[0],IDENTMAX+1); + /* We're not checking ident, but I'm not sure I like the idea of '~' prefixing.. */ + /* XXX - Should this IDENTMAX + 1 be IDENTMAX - 1? Ok, users.h has it defined as + * char ident[IDENTMAX+2]; - WTF? + */ + snprintf(user->ident, IDENTMAX+1, "~%s", parameters[0]); strlcpy(user->fullname,parameters[3],MAXGECOS); user->registered = (user->registered | 1); } -- cgit v1.2.3