diff options
author | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-09-30 18:45:13 +0000 |
---|---|---|
committer | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-09-30 18:45:13 +0000 |
commit | e03c14cf1da821f98ec607732117636deedee780 (patch) | |
tree | fdb92e367e7b64cb92ad56e3c7959bde36461c2a /src | |
parent | a3a360394e4bc9e1c33a278e05364a0a1a610421 (diff) |
Initialise everything properly to avoid crashes. Also, fix a prototype to fix runtime halt due to unresolved sym.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1274 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/users.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/users.c b/src/users.c index 1ba88f426..f203222fe 100644 --- a/src/users.c +++ b/src/users.c @@ -36,6 +36,17 @@ User::User(const std::string &nick) // XXX: we should also duplicate-check here. + /* we used to do this by calloc, no more. */ + this->next = NULL; + this->prev = NULL; + username = host = hostip = vhost = vident = realname = nickTrack = uid = NULL; + server = NULL; + na = NULL; + chans = NULL; + founder_chans = NULL; + moduleData = NULL; + timestamp = my_signon = svid = mode = invalid_pw_time = lastmemosend = lastnickreg = lastmail = 0; + strscpy(this->nick, nick.c_str(), NICKMAX); list = &userlist[HASH(this->nick)]; this->next = *list; |