summaryrefslogtreecommitdiff
path: root/include/oper.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/oper.h')
-rw-r--r--include/oper.h89
1 files changed, 11 insertions, 78 deletions
diff --git a/include/oper.h b/include/oper.h
index c718ea5fb..57ce92f7c 100644
--- a/include/oper.h
+++ b/include/oper.h
@@ -10,17 +10,6 @@
#define OPER_H
class XLineManager;
-extern CoreExport XLineManager *SGLine;
-extern CoreExport XLineManager *SZLine;
-extern CoreExport XLineManager *SQLine;
-extern CoreExport XLineManager *SNLine;
-
-enum XLineType
-{
- X_SNLINE,
- X_SQLINE,
- X_SZLINE
-};
class CoreExport XLine
{
@@ -40,24 +29,29 @@ class CoreExport XLine
Anope::string GetHost() const;
};
-class CoreExport XLineManager
+class CoreExport XLineManager : public Service
{
- private:
- /* List of XLine managers we check users against in XLineManager::CheckAll */
- static std::list<XLineManager *> XLineManagers;
-
+ char type;
protected:
/* List of XLines in this XLineManager */
std::vector<XLine *> XLines;
public:
+ /* List of XLine managers we check users against in XLineManager::CheckAll */
+ static std::list<XLineManager *> XLineManagers;
+
/** Constructor
*/
- XLineManager();
+ XLineManager(Module *creator, const Anope::string &name, char t);
/** Destructor
*/
virtual ~XLineManager();
+ /** The type of xline provided by this service
+ * @return The type
+ */
+ const char &Type();
+
/** Register a XLineManager, places it in XLineManagers for use in XLineManager::CheckAll
* It is important XLineManagers are registered in the proper order. Eg, if you had one akilling
* clients and one handing them free olines, you would want the akilling one first. This way if a client
@@ -165,65 +159,4 @@ class CoreExport XLineManager
virtual void Send(User *u, XLine *x) = 0;
};
-/* This is for AKILLS */
-class SGLineManager : public XLineManager
-{
- public:
- XLine *Add(const Anope::string &mask, const Anope::string &creator, time_t expires, const Anope::string &reason);
-
- void Del(XLine *x);
-
- void OnMatch(User *u, XLine *x);
-
- void OnExpire(XLine *x);
-
- void Send(User *u, XLine *x);
-};
-
-class SNLineManager : public XLineManager
-{
- public:
- XLine *Add(const Anope::string &mask, const Anope::string &creator, time_t expires, const Anope::string &reason);
-
- void Del(XLine *x);
-
- void OnMatch(User *u, XLine *x);
-
- void OnExpire(XLine *x);
-
- void Send(User *u, XLine *x);
-
- XLine *Check(User *u);
-};
-
-class SQLineManager : public XLineManager
-{
- public:
- XLine *Add(const Anope::string &mask, const Anope::string &creator, time_t expires, const Anope::string &reason);
-
- void Del(XLine *x);
-
- void OnMatch(User *u, XLine *x);
-
- void OnExpire(XLine *x);
-
- void Send(User *u, XLine *x);
-
- static bool Check(Channel *c);
-};
-
-class SZLineManager : public XLineManager
-{
- public:
- XLine *Add(const Anope::string &mask, const Anope::string &creator, time_t expires, const Anope::string &reason);
-
- void Del(XLine *x);
-
- void OnMatch(User *u, XLine *x);
-
- void OnExpire(XLine *x);
-
- void Send(User *u, XLine *x);
-};
-
#endif // OPER_H