From 8f5d786f0eaec17dd2cb60f3dfb434caabf48e92 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 9 Oct 2012 05:22:02 -0400 Subject: Cleanup ok if modules with pending identify requests are unloaded --- src/nickserv.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/nickserv.cpp b/src/nickserv.cpp index 53939c6d3..b6455447a 100644 --- a/src/nickserv.cpp +++ b/src/nickserv.cpp @@ -95,7 +95,7 @@ void change_core_display(NickCore *nc) std::set IdentifyRequest::requests; -IdentifyRequest::IdentifyRequest(const Anope::string &acc, const Anope::string &pass) : account(acc), password(pass), dispatched(false), success(false) +IdentifyRequest::IdentifyRequest(Module *o, const Anope::string &acc, const Anope::string &pass) : owner(o), account(acc), password(pass), dispatched(false), success(false) { requests.insert(this); } @@ -150,5 +150,7 @@ void IdentifyRequest::ModuleUnload(Module *m) ++it; ir->Release(m); + if (ir->owner == m) + delete ir; } } -- cgit