summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nickserv.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/nickserv.c b/src/nickserv.c
index 0c9042cc1..f09cdb9fd 100644
--- a/src/nickserv.c
+++ b/src/nickserv.c
@@ -1106,6 +1106,24 @@ void change_core_display(NickCore * nc)
static int delcore(NickCore * nc)
{
int i;
+ User *user;
+
+ /* Clean up this nick core from any users online using it
+ * (ones that /nick but remain unidentified)
+ */
+ for (i = 0; i < 1024; ++i)
+ {
+ for (user = userlist[i]; user; user = user->next)
+ {
+ if (user->nc && user->nc == nc)
+ {
+ ircdproto->SendAccountLogout(user, user->nc);
+ user->nc = NULL;
+ FOREACH_MOD(I_OnNickLogout, OnNickLogout(user));
+ }
+ }
+ }
+
/* (Hopefully complete) cleanup */
cs_remove_nick(nc);