summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/ns_group.c1
-rw-r--r--src/core/ns_register.c1
-rw-r--r--src/core/os_oper.c2
-rw-r--r--src/nickserv.c3
-rw-r--r--src/users.c9
5 files changed, 13 insertions, 3 deletions
diff --git a/src/core/ns_group.c b/src/core/ns_group.c
index c86f460cd..5648c3fe3 100644
--- a/src/core/ns_group.c
+++ b/src/core/ns_group.c
@@ -164,6 +164,7 @@ class CommandNSGroup : public Command
}
u->na = na;
+ u->nc = na->nc;
na->u = u;
send_event(EVENT_GROUP, 1, u->nick);
diff --git a/src/core/ns_register.c b/src/core/ns_register.c
index a02a043c4..a79997bce 100644
--- a/src/core/ns_register.c
+++ b/src/core/ns_register.c
@@ -89,6 +89,7 @@ class CommandNSConfirm : public Command
if (!force)
{
u->na = na;
+ u->nc = na->nc;
na->u = u;
alog("%s: '%s' registered by %s@%s (e-mail: %s)", s_NickServ, u->nick, u->GetIdent().c_str(), u->host, nr->email ? nr->email : "none");
if (NSAddAccessOnReg)
diff --git a/src/core/os_oper.c b/src/core/os_oper.c
index bc7031c51..7ddceb257 100644
--- a/src/core/os_oper.c
+++ b/src/core/os_oper.c
@@ -172,7 +172,7 @@ class CommandOSOper : public Command
if (!nick || (isdigit(*nick) && strspn(nick, "1234567890,-") == strlen(nick)))
{
- res = slist_enum(&servopers, nick, &oper_list_callback, u, &sent_header);
+ int res = slist_enum(&servopers, nick, &oper_list_callback, u, &sent_header);
if (!res)
{
notice_lang(s_OperServ, u, OPER_OPER_NO_MATCH);
diff --git a/src/nickserv.c b/src/nickserv.c
index 2488c8437..8b2c4d46b 100644
--- a/src/nickserv.c
+++ b/src/nickserv.c
@@ -1126,6 +1126,7 @@ int delnickrequest(NickRequest * nr)
int delnick(NickAlias * na)
{
+ User *u = NULL;
/* First thing to do: remove any timeout belonging to the nick we're deleting */
clean_ns_timeouts(na);
@@ -1134,6 +1135,7 @@ int delnick(NickAlias * na)
if (na->u)
{
+ u = na->u;
na->u->na = NULL;
if (ircd->modeonunreg)
@@ -1153,6 +1155,7 @@ int delnick(NickAlias * na)
if (!delcore(na->nc))
return 0;
na->nc = NULL;
+ u->nc = NULL;
}
else
{
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;
+ }
}
}