diff options
| author | 2005-12-22 17:18:18 +0000 | |
|---|---|---|
| committer | 2005-12-22 17:18:18 +0000 | |
| commit | 4ffd644a14fa40b758f8937b06844861009bfec1 (patch) | |
| tree | 53f79a6d5efa581098363f6631d6f7170061bb93 /src/users.cpp | |
| parent | Fixed encryption being set on a connection that has only just begun! (diff) | |
| download | inspircd++-4ffd644a14fa40b758f8937b06844861009bfec1.tar.gz inspircd++-4ffd644a14fa40b758f8937b06844861009bfec1.tar.bz2 inspircd++-4ffd644a14fa40b758f8937b06844861009bfec1.zip | |
Optimized out strcpys that copy empty strings (craq++)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2637 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
| -rw-r--r-- | src/users.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/users.cpp b/src/users.cpp index 2993b31bb..6f5c96279 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -63,8 +63,7 @@ template<typename T> inline string ConvToStr(const T &in) userrec::userrec() { // the PROPER way to do it, AVOID bzero at *ALL* costs - *nick = *ident = *host = *dhost = *fullname = *modes = *awaymsg = *oper = 0; - strcpy(ip,"127.0.0.1"); + *nick = *ident = *host = *dhost = *fullname = *modes = *awaymsg = *oper = *ip = 0 server = (char*)FindServerNamePtr(Config->ServerName); reset_due = TIME; lines_in = fd = lastping = signon = idle_lastmsg = nping = registered = 0; @@ -761,7 +760,7 @@ void force_nickchange(userrec* user,const char* newnick) char nick[MAXBUF]; int MOD_RESULT = 0; - strcpy(nick,""); + *nick = 0; FOREACH_RESULT(OnUserPreNick(user,newnick)); if (MOD_RESULT) { |
