summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-07-27 23:56:26 -0400
committerAdam <Adam@anope.org>2010-07-27 23:56:26 -0400
commitd034a9c36a6ae499bb0c039d0ffd44e698dd4085 (patch)
tree8246116bd11f549c30cb2a7bcfd55cd8b59eec03 /src
parent49064ec67dfe684abb075305ce9433ed801eab68 (diff)
Log out superadmins when someone forces them to logout, and fixed crash when using /os umode +r on an unregistered user when using inspircd12
Diffstat (limited to 'src')
-rw-r--r--src/core/ns_logout.c2
-rw-r--r--src/protocol/inspircd12.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/core/ns_logout.c b/src/core/ns_logout.c
index 09a594913..eaa04220e 100644
--- a/src/core/ns_logout.c
+++ b/src/core/ns_logout.c
@@ -102,7 +102,7 @@ int do_logout(User * u)
common_svsmode(u2, ircd->modeonunreg, "1");
}
- u->isSuperAdmin = 0; /* Dont let people logout and remain a SuperAdmin */
+ u2->isSuperAdmin = 0; /* Dont let people logout and remain a SuperAdmin */
alog("%s: %s!%s@%s logged out nickname %s", s_NickServ, u->nick,
u->username, u->host, u2->nick);
diff --git a/src/protocol/inspircd12.c b/src/protocol/inspircd12.c
index b6a92231a..e5722c236 100644
--- a/src/protocol/inspircd12.c
+++ b/src/protocol/inspircd12.c
@@ -614,7 +614,7 @@ void inspircd_cmd_svsmode(User * u, int ac, char **av)
Uid *ud = find_uid(s_NickServ);
send_cmd(ud->uid, "MODE %s %s", u->nick, merge_args(ac, av));
- if (strstr(av[0], "+r")) {
+ if (strstr(av[0], "+r") && u->na) {
send_cmd(TS6SID, "METADATA %s accountname :%s", u->uid, u->na->nc->display);
} else if (strstr(av[0], "-r")) {
send_cmd(TS6SID, "METADATA %s accountname :", u->uid);