From d034a9c36a6ae499bb0c039d0ffd44e698dd4085 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 27 Jul 2010 23:56:26 -0400 Subject: Log out superadmins when someone forces them to logout, and fixed crash when using /os umode +r on an unregistered user when using inspircd12 --- src/core/ns_logout.c | 2 +- src/protocol/inspircd12.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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); -- cgit