summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2005-11-30 06:31:22 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2005-11-30 06:31:22 +0000
commitb1672e3514c5f17e2d32699e3bb3398e6a63e971 (patch)
treec67e4af7ff56811d90296df69a4beb3fa53a178f /src
parent7aded111763af65e78841e6604b21c590cbcd12b (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/commands.cpp7
1 files changed, 5 insertions, 2 deletions
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);
}