summaryrefslogtreecommitdiff
path: root/src/account.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-05-28 12:07:29 -0400
committerAdam <Adam@anope.org>2014-05-28 12:07:54 -0400
commitf29e1cf383529a1a29f02b0669d973f5ee0b7a66 (patch)
tree3c33db276dc9328235bbd572641521ed44458176 /src/account.cpp
parent1253c70e0682fa1490c99c3d2869049a0e3fa2e0 (diff)
Move most of the core pseudoclient logic to modules
Diffstat (limited to 'src/account.cpp')
-rw-r--r--src/account.cpp80
1 files changed, 0 insertions, 80 deletions
diff --git a/src/account.cpp b/src/account.cpp
deleted file mode 100644
index e58ee1646..000000000
--- a/src/account.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- *
- * (C) 2003-2014 Anope Team
- * Contact us at team@anope.org
- *
- * Please read COPYING and README for further details.
- *
- * Based on the original code of Epona by Lara.
- * Based on the original code of Services by Andy Church.
- *
- */
-
-#include "services.h"
-#include "account.h"
-#include "modules.h"
-#include "users.h"
-#include "protocol.h"
-#include "regchannel.h"
-
-std::set<IdentifyRequest *> IdentifyRequest::Requests;
-
-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);
-}
-
-IdentifyRequest::~IdentifyRequest()
-{
- Requests.erase(this);
-}
-
-void IdentifyRequest::Hold(Module *m)
-{
- holds.insert(m);
-}
-
-void IdentifyRequest::Release(Module *m)
-{
- holds.erase(m);
- if (holds.empty() && dispatched)
- {
- if (!success)
- this->OnFail();
- delete this;
- }
-}
-
-void IdentifyRequest::Success(Module *m)
-{
- if (!success)
- {
- this->OnSuccess();
- success = true;
- }
-}
-
-void IdentifyRequest::Dispatch()
-{
- if (holds.empty())
- {
- if (!success)
- this->OnFail();
- delete this;
- }
- else
- dispatched = true;
-}
-
-void IdentifyRequest::ModuleUnload(Module *m)
-{
- for (std::set<IdentifyRequest *>::iterator it = Requests.begin(), it_end = Requests.end(); it != it_end;)
- {
- IdentifyRequest *ir = *it;
- ++it;
-
- ir->Release(m);
- if (ir->owner == m)
- delete ir;
- }
-}