summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/extern.h4
-rw-r--r--src/users.c11
2 files changed, 13 insertions, 2 deletions
diff --git a/include/extern.h b/include/extern.h
index 5bbb39540..2881b88ec 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -1299,8 +1299,8 @@ E int anope_flood_mode_check(const char *value);
E void anope_cmd_jupe(const char *jserver, const char *who, const char *reason);
-E int anope_valid_nick(char *nick);
-E int anope_valid_chan(char *chan);
+E int anope_valid_nick(const char *nick);
+E int anope_valid_chan(const char *chan);
E char *common_get_vident(User *u);
E char *common_get_vhost(User *u);
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;