From 22658d63bdb1e52a66f4514af45fa55ca5891345 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 26 May 2013 17:13:11 -0400 Subject: Get rid of the remaining references in the core to specific services. Move more stuff out of the core to the proper modules. --- include/modules/chanserv.h | 18 ----------------- include/modules/global.h | 20 ------------------- include/modules/memoserv.h | 34 -------------------------------- include/modules/nickserv.h | 16 --------------- include/modules/pseudoclients/chanserv.h | 18 +++++++++++++++++ include/modules/pseudoclients/global.h | 20 +++++++++++++++++++ include/modules/pseudoclients/memoserv.h | 34 ++++++++++++++++++++++++++++++++ include/modules/pseudoclients/nickserv.h | 17 ++++++++++++++++ 8 files changed, 89 insertions(+), 88 deletions(-) delete mode 100644 include/modules/chanserv.h delete mode 100644 include/modules/global.h delete mode 100644 include/modules/memoserv.h delete mode 100644 include/modules/nickserv.h create mode 100644 include/modules/pseudoclients/chanserv.h create mode 100644 include/modules/pseudoclients/global.h create mode 100644 include/modules/pseudoclients/memoserv.h create mode 100644 include/modules/pseudoclients/nickserv.h (limited to 'include/modules') diff --git a/include/modules/chanserv.h b/include/modules/chanserv.h deleted file mode 100644 index e1c3849fd..000000000 --- a/include/modules/chanserv.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef CHANSERV_H -#define CHANSERV_H - -class ChanServService : public Service -{ - public: - ChanServService(Module *m) : Service(m, "ChanServService", "ChanServ") - { - } - - /* Have ChanServ hold the channel, that is, join and set +nsti and wait - * for a few minutes so no one can join or rejoin. - */ - virtual void Hold(Channel *c) = 0; -}; - -#endif // CHANSERV_H - diff --git a/include/modules/global.h b/include/modules/global.h deleted file mode 100644 index 52afc4a23..000000000 --- a/include/modules/global.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef GLOBAL_H -#define GLOBAL_H - -class GlobalService : public Service -{ - public: - GlobalService(Module *m) : Service(m, "GlobalService", "Global") - { - } - - /** Send out a global message to all users - * @param sender Our client which should send the global - * @param source The sender of the global - * @param message The message - */ - virtual void SendGlobal(const BotInfo *sender, const Anope::string &source, const Anope::string &message) = 0; -}; - -#endif // GLOBAL_H - diff --git a/include/modules/memoserv.h b/include/modules/memoserv.h deleted file mode 100644 index d35d3f8a0..000000000 --- a/include/modules/memoserv.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef MEMOSERV_H -#define MEMOSERV_H - -class MemoServService : public Service -{ - public: - enum MemoResult - { - MEMO_SUCCESS, - MEMO_INVALID_TARGET, - MEMO_TOO_FAST, - MEMO_TARGET_FULL - }; - - MemoServService(Module *m) : Service(m, "MemoServService", "MemoServ") - { - } - - /** Sends a memo. - * @param source The source of the memo, can be anythin. - * @param target The target of the memo, nick or channel. - * @param message Memo text - * @param force true to force the memo, restrictions/delays etc are not checked - */ - virtual MemoResult Send(const Anope::string &source, const Anope::string &target, const Anope::string &message, bool force = false) = 0; - - /** Check for new memos and notify the user if there are any - * @param u The user - */ - virtual void Check(User *u) = 0; -}; - -#endif // MEMOSERV_H - diff --git a/include/modules/nickserv.h b/include/modules/nickserv.h deleted file mode 100644 index b20d6ebd1..000000000 --- a/include/modules/nickserv.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef NICKSERV_H -#define NICKSERV_H - -class NickServService : public Service -{ - public: - NickServService(Module *m) : Service(m, "NickServService", "NickServ") - { - } - - virtual void Validate(User *u) = 0; - virtual void Login(User *u, NickAlias *na) = 0; -}; - -#endif // NICKSERV_H - diff --git a/include/modules/pseudoclients/chanserv.h b/include/modules/pseudoclients/chanserv.h new file mode 100644 index 000000000..e1c3849fd --- /dev/null +++ b/include/modules/pseudoclients/chanserv.h @@ -0,0 +1,18 @@ +#ifndef CHANSERV_H +#define CHANSERV_H + +class ChanServService : public Service +{ + public: + ChanServService(Module *m) : Service(m, "ChanServService", "ChanServ") + { + } + + /* Have ChanServ hold the channel, that is, join and set +nsti and wait + * for a few minutes so no one can join or rejoin. + */ + virtual void Hold(Channel *c) = 0; +}; + +#endif // CHANSERV_H + diff --git a/include/modules/pseudoclients/global.h b/include/modules/pseudoclients/global.h new file mode 100644 index 000000000..52afc4a23 --- /dev/null +++ b/include/modules/pseudoclients/global.h @@ -0,0 +1,20 @@ +#ifndef GLOBAL_H +#define GLOBAL_H + +class GlobalService : public Service +{ + public: + GlobalService(Module *m) : Service(m, "GlobalService", "Global") + { + } + + /** Send out a global message to all users + * @param sender Our client which should send the global + * @param source The sender of the global + * @param message The message + */ + virtual void SendGlobal(const BotInfo *sender, const Anope::string &source, const Anope::string &message) = 0; +}; + +#endif // GLOBAL_H + diff --git a/include/modules/pseudoclients/memoserv.h b/include/modules/pseudoclients/memoserv.h new file mode 100644 index 000000000..d35d3f8a0 --- /dev/null +++ b/include/modules/pseudoclients/memoserv.h @@ -0,0 +1,34 @@ +#ifndef MEMOSERV_H +#define MEMOSERV_H + +class MemoServService : public Service +{ + public: + enum MemoResult + { + MEMO_SUCCESS, + MEMO_INVALID_TARGET, + MEMO_TOO_FAST, + MEMO_TARGET_FULL + }; + + MemoServService(Module *m) : Service(m, "MemoServService", "MemoServ") + { + } + + /** Sends a memo. + * @param source The source of the memo, can be anythin. + * @param target The target of the memo, nick or channel. + * @param message Memo text + * @param force true to force the memo, restrictions/delays etc are not checked + */ + virtual MemoResult Send(const Anope::string &source, const Anope::string &target, const Anope::string &message, bool force = false) = 0; + + /** Check for new memos and notify the user if there are any + * @param u The user + */ + virtual void Check(User *u) = 0; +}; + +#endif // MEMOSERV_H + diff --git a/include/modules/pseudoclients/nickserv.h b/include/modules/pseudoclients/nickserv.h new file mode 100644 index 000000000..c0238ecfc --- /dev/null +++ b/include/modules/pseudoclients/nickserv.h @@ -0,0 +1,17 @@ +#ifndef NICKSERV_H +#define NICKSERV_H + +class NickServService : public Service +{ + public: + NickServService(Module *m) : Service(m, "NickServService", "NickServ") + { + } + + virtual void Validate(User *u) = 0; + virtual void Collide(User *u, NickAlias *na) = 0; + virtual void Release(NickAlias *na) = 0; +}; + +#endif // NICKSERV_H + -- cgit