diff options
author | Adam <Adam@anope.org> | 2010-06-27 14:41:57 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-06-27 14:41:57 -0400 |
commit | 2979a0e9759eef695141386208a46342aaf23cdb (patch) | |
tree | dd6b27a4dc3681a5ed02a363615be5b46cb77be2 | |
parent | de4f0cc28fa2ef2a3a570cffcfd81fcd3e786dfe (diff) |
Log out users from their groups when they disconnect, keeps us from storing invalid pointers in the nickcore user list
-rw-r--r-- | src/core/ns_drop.c | 6 | ||||
-rw-r--r-- | src/users.c | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/core/ns_drop.c b/src/core/ns_drop.c index a4ad89239..57247e577 100644 --- a/src/core/ns_drop.c +++ b/src/core/ns_drop.c @@ -89,10 +89,12 @@ class CommandNSDrop : public Command notice_lang(Config.s_NickServ, u, NICK_X_DROPPED, nick); else notice_lang(Config.s_NickServ, u, NICK_DROPPED); - if (my_nick) - delete [] my_nick; } } + + if (my_nick) + delete [] my_nick; + return MOD_CONT; } diff --git a/src/users.c b/src/users.c index 8614a6beb..6b3625dfe 100644 --- a/src/users.c +++ b/src/users.c @@ -226,6 +226,8 @@ User::~User() { Alog(LOG_DEBUG_2) << "User::~User() called"; + this->Logout(); + if (Config.LogUsers) { const char *srealname = normalizeBuffer(this->realname); |