summaryrefslogtreecommitdiff
path: root/include/account.h
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-10-07 22:39:58 -0400
committerAdam <Adam@anope.org>2012-10-07 22:39:58 -0400
commitb8b63ff115f0daddf479b0da507a2f731255a06d (patch)
treed6b82bf0dfc39fdfe6a6a23ba318bb0c2906d6c1 /include/account.h
parent0a111c19764ed14ab5f724c78d9dd8c08a3c124f (diff)
Remove the asynchronous identifing hack and replace it with something better. Fixes m_*_authentication only being able to properly work when people identify normally using nickserv/identify
Diffstat (limited to 'include/account.h')
-rw-r--r--include/account.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/account.h b/include/account.h
index 8b4920fe4..7aecab43a 100644
--- a/include/account.h
+++ b/include/account.h
@@ -304,7 +304,39 @@ class CoreExport NickCore : public Extensible, public Flags<NickCoreFlag, NI_END
* Deletes all the memory allocated in the certificate list vector and then clears the vector.
*/
void ClearCert();
+};
+
+class IdentifyRequest
+{
+ Anope::string account;
+ Anope::string password;
+
+ std::set<Module *> holds;
+ bool dispatched;
+ bool success;
+
+ static std::set<IdentifyRequest *> requests;
+
+ protected:
+ IdentifyRequest(const Anope::string &acc, const Anope::string &pass);
+ virtual ~IdentifyRequest();
+
+ public:
+ virtual void OnSuccess() = 0;
+ virtual void OnFail() = 0;
+
+ const Anope::string &GetAccount() const { return account; }
+ const Anope::string &GetPassword() const { return password; }
+
+ /* Hold this request. Once held it must be Release()d later on */
+ void Hold(Module *m);
+ void Release(Module *m);
+
+ void Success(Module *m);
+
+ void Dispatch();
+ static void ModuleUnload(Module *m);
};
extern CoreExport void change_core_display(NickCore *nc);