summaryrefslogtreecommitdiff
path: root/src/users.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/users.c')
-rw-r--r--src/users.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/users.c b/src/users.c
index 364d3bdc0..509ac30e4 100644
--- a/src/users.c
+++ b/src/users.c
@@ -41,6 +41,7 @@ User::User(const std::string &snick, const std::string &suid)
host = hostip = vhost = realname = nickTrack = NULL;
server = NULL;
na = NULL;
+ nc = NULL;
chans = NULL;
founder_chans = NULL;
invalid_pw_count = timestamp = my_signon = svid = mode = invalid_pw_time = lastmemosend = lastnickreg = lastmail = 0;
@@ -57,8 +58,10 @@ User::User(const std::string &snick, const std::string &suid)
this->na = findnick(snick);
- if (this->na)
+ if (this->na) {
this->na->u = this;
+ this->nc = this->na->nc;
+ }
usercnt++;
@@ -113,8 +116,10 @@ void User::SetNewNick(const std::string &newnick)
if (this->na)
this->na->u = NULL;
this->na = findnick(this->nick);
- if (this->na)
+ if (this->na) {
this->na->u = this;
+ this->nc = this->na->nc;
+ }
}
}