diff options
author | robbeh <robbeh@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-15 14:54:56 +0000 |
---|---|---|
committer | robbeh <robbeh@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-15 14:54:56 +0000 |
commit | 09dedba37955654b7da09ffcaf49081ca1d9df2a (patch) | |
tree | 453518f04138cfd9ba33c2b0f51211561bdb7608 /src | |
parent | 602b468efdd7cbe4ca40a8e38846189e3c09fb28 (diff) |
First stab at adding User::nc as requested!
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2055 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/core/ns_group.c | 1 | ||||
-rw-r--r-- | src/core/ns_register.c | 1 | ||||
-rw-r--r-- | src/core/os_oper.c | 2 | ||||
-rw-r--r-- | src/nickserv.c | 3 | ||||
-rw-r--r-- | src/users.c | 9 |
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; + } } } |