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 --- modules/commands/ns_ghost.cpp | 6 +++--- modules/commands/ns_group.cpp | 6 +++--- modules/commands/ns_identify.cpp | 4 ++-- modules/commands/ns_recover.cpp | 6 +++--- modules/commands/ns_release.cpp | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) (limited to 'modules/commands') diff --git a/modules/commands/ns_ghost.cpp b/modules/commands/ns_ghost.cpp index 9b48a43d1..53082e0a4 100644 --- a/modules/commands/ns_ghost.cpp +++ b/modules/commands/ns_ghost.cpp @@ -19,7 +19,7 @@ class NSGhostRequest : public IdentifyRequest Command *cmd; public: - NSGhostRequest(CommandSource &src, Command *c, const Anope::string &user, const Anope::string &pass) : IdentifyRequest(user, pass), source(src), cmd(c) { } + NSGhostRequest(Module *o, CommandSource &src, Command *c, const Anope::string &user, const Anope::string &pass) : IdentifyRequest(o, user, pass), source(src), cmd(c) { } void OnSuccess() anope_override { @@ -90,13 +90,13 @@ class CommandNSGhost : public Command if (ok == false && !pass.empty()) { - NSGhostRequest *req = new NSGhostRequest(source, this, na->nc->display, pass); + NSGhostRequest *req = new NSGhostRequest(owner, source, this, na->nc->display, pass); FOREACH_MOD(I_OnCheckAuthentication, OnCheckAuthentication(source.GetUser(), req)); req->Dispatch(); } else { - NSGhostRequest req(source, this, na->nc->display, pass); + NSGhostRequest req(owner, source, this, na->nc->display, pass); if (ok) req.OnSuccess(); diff --git a/modules/commands/ns_group.cpp b/modules/commands/ns_group.cpp index 30026c109..58251d76d 100644 --- a/modules/commands/ns_group.cpp +++ b/modules/commands/ns_group.cpp @@ -21,7 +21,7 @@ class NSGroupRequest : public IdentifyRequest dynamic_reference target; public: - NSGroupRequest(CommandSource &src, Command *c, const Anope::string &n, NickAlias *targ, const Anope::string &pass) : IdentifyRequest(targ->nc->display, pass), source(src), cmd(c), nick(n), target(targ) { } + NSGroupRequest(Module *o, CommandSource &src, Command *c, const Anope::string &n, NickAlias *targ, const Anope::string &pass) : IdentifyRequest(o, targ->nc->display, pass), source(src), cmd(c), nick(n), target(targ) { } void OnSuccess() anope_override { @@ -146,13 +146,13 @@ class CommandNSGroup : public Command if (ok == false && !pass.empty()) { - NSGroupRequest *req = new NSGroupRequest(source, this, u->nick, target, pass); + NSGroupRequest *req = new NSGroupRequest(owner, source, this, u->nick, target, pass); FOREACH_MOD(I_OnCheckAuthentication, OnCheckAuthentication(source.GetUser(), req)); req->Dispatch(); } else { - NSGroupRequest req(source, this, u->nick, target, pass); + NSGroupRequest req(owner, source, this, u->nick, target, pass); if (ok) req.OnSuccess(); diff --git a/modules/commands/ns_identify.cpp b/modules/commands/ns_identify.cpp index c71d8e4a7..dde24d72d 100644 --- a/modules/commands/ns_identify.cpp +++ b/modules/commands/ns_identify.cpp @@ -19,7 +19,7 @@ class NSIdentifyRequest : public IdentifyRequest Command *cmd; public: - NSIdentifyRequest(CommandSource &s, Command *c, const Anope::string &acc, const Anope::string &pass) : IdentifyRequest(acc, pass), source(s), cmd(c) { } + NSIdentifyRequest(Module *o, CommandSource &s, Command *c, const Anope::string &acc, const Anope::string &pass) : IdentifyRequest(o, acc, pass), source(s), cmd(c) { } void OnSuccess() anope_override { @@ -81,7 +81,7 @@ class CommandNSIdentify : public Command source.Reply(_("You are already identified.")); else { - NSIdentifyRequest *req = new NSIdentifyRequest(source, this, na ? na->nc->display : nick, pass); + NSIdentifyRequest *req = new NSIdentifyRequest(owner, source, this, na ? na->nc->display : nick, pass); FOREACH_MOD(I_OnCheckAuthentication, OnCheckAuthentication(source.GetUser(), req)); req->Dispatch(); } diff --git a/modules/commands/ns_recover.cpp b/modules/commands/ns_recover.cpp index 0afa9abbe..648bbf032 100644 --- a/modules/commands/ns_recover.cpp +++ b/modules/commands/ns_recover.cpp @@ -21,7 +21,7 @@ class NSRecoverRequest : public IdentifyRequest dynamic_reference na; public: - NSRecoverRequest(CommandSource &src, Command *c, NickAlias *n, const Anope::string &pass) : IdentifyRequest(n->nc->display, pass), source(src), cmd(c), na(n) { } + NSRecoverRequest(Module *m, CommandSource &src, Command *c, NickAlias *n, const Anope::string &pass) : IdentifyRequest(m, n->nc->display, pass), source(src), cmd(c), na(n) { } void OnSuccess() anope_override { @@ -101,13 +101,13 @@ class CommandNSRecover : public Command if (ok == false && !pass.empty()) { - NSRecoverRequest *req = new NSRecoverRequest(source, this, na, pass); + NSRecoverRequest *req = new NSRecoverRequest(owner, source, this, na, pass); FOREACH_MOD(I_OnCheckAuthentication, OnCheckAuthentication(source.GetUser(), req)); req->Dispatch(); } else { - NSRecoverRequest req(source, this, na, pass); + NSRecoverRequest req(owner, source, this, na, pass); if (ok) req.OnSuccess(); diff --git a/modules/commands/ns_release.cpp b/modules/commands/ns_release.cpp index 8afd9fade..cd669e707 100644 --- a/modules/commands/ns_release.cpp +++ b/modules/commands/ns_release.cpp @@ -20,7 +20,7 @@ class NSReleaseRequest : public IdentifyRequest dynamic_reference na; public: - NSReleaseRequest(CommandSource &src, Command *c, NickAlias *n, const Anope::string &pass) : IdentifyRequest(n->nc->display, pass), source(src), cmd(c), na(n) { } + NSReleaseRequest(Module *m, CommandSource &src, Command *c, NickAlias *n, const Anope::string &pass) : IdentifyRequest(m, n->nc->display, pass), source(src), cmd(c), na(n) { } void OnSuccess() anope_override { @@ -81,13 +81,13 @@ class CommandNSRelease : public Command if (ok == false && !pass.empty()) { - NSReleaseRequest *req = new NSReleaseRequest(source, this, na, pass); + NSReleaseRequest *req = new NSReleaseRequest(owner, source, this, na, pass); FOREACH_MOD(I_OnCheckAuthentication, OnCheckAuthentication(source.GetUser(), req)); req->Dispatch(); } else { - NSReleaseRequest req(source, this, na, pass); + NSReleaseRequest req(owner, source, this, na, pass); if (ok) req.OnSuccess(); -- cgit