summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-07 12:05:34 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-07 12:05:34 +0000
commit34b0ca01b6da7fc039ecdf4d0bc8bbb5bb3f64bf (patch)
tree4ac31611f90a8b5660a942fc44aee4d9305f807d /src/users.cpp
parent5dd6b4e97d9c63172fac90a5b2b7167214b4ba64 (diff)
Improved userlist to avoid strlen
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3514 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/users.cpp b/src/users.cpp
index e4d2546a9..516c58e70 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -420,12 +420,7 @@ void kill_link(userrec *user,const char* r)
char reason[MAXBUF];
- strlcpy(reason,r,MAXBUF-1);
-
- if (strlen(reason)>MAXQUIT)
- {
- reason[MAXQUIT-1] = '\0';
- }
+ strlcpy(reason,r,MAXQUIT-1);
log(DEBUG,"kill_link: %s '%s'",user->nick,reason);
Write(user->fd,"ERROR :Closing link (%s@%s) [%s]",user->ident,user->host,reason);