diff options
| author | Adam <Adam@anope.org> | 2012-10-09 05:22:02 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2012-10-09 05:22:02 -0400 |
| commit | 8f5d786f0eaec17dd2cb60f3dfb434caabf48e92 (patch) | |
| tree | 5bc42eaee77104af3169d321eae8730c5e13ee03 /src | |
| parent | 1dacc648a0ddc20679b6242bc94edb9ae657a247 (diff) | |
Cleanup ok if modules with pending identify requests are unloaded
Diffstat (limited to 'src')
| -rw-r--r-- | src/nickserv.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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 *> 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; } } |
