From 1b24c96ab07d99e5d95ec9337e7b541696b91eb3 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 31 Dec 2015 13:01:18 -0500 Subject: Rename haader file names to be consistent with module names --- include/modules/botserv/badwords.h | 102 +++++++++++++++++++++ include/modules/botserv/bot.h | 38 ++++++++ include/modules/botserv/info.h | 21 +++++ include/modules/botserv/kick.h | 132 ++++++++++++++++++++++++++++ include/modules/bs_badwords.h | 102 --------------------- include/modules/bs_bot.h | 38 -------- include/modules/bs_info.h | 21 ----- include/modules/bs_kick.h | 132 ---------------------------- include/modules/chanserv/access.h | 28 ++++++ include/modules/chanserv/akick.h | 64 ++++++++++++++ include/modules/chanserv/drop.h | 22 +++++ include/modules/chanserv/entrymsg.h | 29 ++++++ include/modules/chanserv/info.h | 24 +++++ include/modules/chanserv/log.h | 44 ++++++++++ include/modules/chanserv/mode.h | 123 ++++++++++++++++++++++++++ include/modules/chanserv/set.h | 26 ++++++ include/modules/chanserv/set_misc.h | 25 ++++++ include/modules/chanserv/suspend.h | 53 +++++++++++ include/modules/cs_access.h | 28 ------ include/modules/cs_akick.h | 64 -------------- include/modules/cs_drop.h | 22 ----- include/modules/cs_entrymsg.h | 29 ------ include/modules/cs_info.h | 24 ----- include/modules/cs_log.h | 44 ---------- include/modules/cs_mode.h | 123 -------------------------- include/modules/cs_set.h | 26 ------ include/modules/cs_set_misc.h | 25 ------ include/modules/cs_suspend.h | 53 ----------- include/modules/hostserv/del.h | 20 +++++ include/modules/hs_del.h | 20 ----- include/modules/nickserv/access.h | 22 +++++ include/modules/nickserv/ajoin.h | 25 ++++++ include/modules/nickserv/cert.h | 66 ++++++++++++++ include/modules/nickserv/drop.h | 22 +++++ include/modules/nickserv/group.h | 22 +++++ include/modules/nickserv/info.h | 24 +++++ include/modules/nickserv/set.h | 26 ++++++ include/modules/nickserv/set_misc.h | 25 ++++++ include/modules/nickserv/suspend.h | 53 +++++++++++ include/modules/nickserv/update.h | 21 +++++ include/modules/ns_access.h | 22 ----- include/modules/ns_ajoin.h | 25 ------ include/modules/ns_cert.h | 66 -------------- include/modules/ns_drop.h | 22 ----- include/modules/ns_group.h | 22 ----- include/modules/ns_info.h | 24 ----- include/modules/ns_set.h | 26 ------ include/modules/ns_set_misc.h | 25 ------ include/modules/ns_suspend.h | 53 ----------- include/modules/ns_update.h | 21 ----- include/modules/operserv/defcon.h | 21 +++++ include/modules/operserv/dns.h | 72 +++++++++++++++ include/modules/operserv/forbid.h | 56 ++++++++++++ include/modules/operserv/ignore.h | 43 +++++++++ include/modules/operserv/info.h | 29 ++++++ include/modules/operserv/news.h | 32 +++++++ include/modules/operserv/session.h | 77 ++++++++++++++++ include/modules/os_defcon.h | 21 ----- include/modules/os_dns.h | 72 --------------- include/modules/os_forbid.h | 56 ------------ include/modules/os_ignore.h | 43 --------- include/modules/os_info.h | 29 ------ include/modules/os_news.h | 32 ------- include/modules/os_session.h | 77 ---------------- modules/botserv/assign.cpp | 2 +- modules/botserv/badwords.cpp | 2 +- modules/botserv/bot.cpp | 2 +- modules/botserv/info.cpp | 2 +- modules/botserv/kick.cpp | 6 +- modules/botserv/set.cpp | 2 +- modules/chanserv/akick.cpp | 2 +- modules/chanserv/clone.cpp | 4 +- modules/chanserv/drop.cpp | 2 +- modules/chanserv/entrymsg.cpp | 2 +- modules/chanserv/info.cpp | 2 +- modules/chanserv/list.cpp | 6 +- modules/chanserv/log.cpp | 2 +- modules/chanserv/main/channel.cpp | 2 +- modules/chanserv/main/chanserv.cpp | 8 +- modules/chanserv/mode.cpp | 4 +- modules/chanserv/set.cpp | 6 +- modules/chanserv/set_misc.cpp | 6 +- modules/chanserv/status.cpp | 2 +- modules/chanserv/suspend.cpp | 6 +- modules/chanserv/topic.cpp | 6 +- modules/database/old.cpp | 22 ++--- modules/fantasy.cpp | 2 +- modules/greet.cpp | 6 +- modules/hostserv/del.cpp | 2 +- modules/hostserv/group.cpp | 2 +- modules/hostserv/main/hostserv.cpp | 4 +- modules/memoserv/main/memoserv.cpp | 4 +- modules/nickserv/access.cpp | 2 +- modules/nickserv/ajoin.cpp | 2 +- modules/nickserv/cert.cpp | 2 +- modules/nickserv/drop.cpp | 2 +- modules/nickserv/group.cpp | 4 +- modules/nickserv/info.cpp | 4 +- modules/nickserv/list.cpp | 4 +- modules/nickserv/main/account.cpp | 2 +- modules/nickserv/main/nickserv.cpp | 6 +- modules/nickserv/recover.cpp | 2 +- modules/nickserv/set.cpp | 4 +- modules/nickserv/set_misc.cpp | 6 +- modules/nickserv/suspend.cpp | 4 +- modules/nickserv/update.cpp | 2 +- modules/operserv/defcon.cpp | 4 +- modules/operserv/dns.cpp | 2 +- modules/operserv/forbid.cpp | 2 +- modules/operserv/ignore.cpp | 2 +- modules/operserv/info.cpp | 6 +- modules/operserv/news.cpp | 2 +- modules/operserv/session.cpp | 2 +- modules/operserv/stats.cpp | 2 +- modules/protocol/charybdis.cpp | 2 +- modules/protocol/inspircd20.cpp | 4 +- modules/protocol/unreal.cpp | 2 +- modules/sasl.cpp | 2 +- modules/webcpanel/pages/chanserv/akick.cpp | 2 +- modules/webcpanel/pages/nickserv/access.cpp | 2 +- modules/webcpanel/pages/nickserv/cert.cpp | 2 +- 121 files changed, 1488 insertions(+), 1488 deletions(-) create mode 100644 include/modules/botserv/badwords.h create mode 100644 include/modules/botserv/bot.h create mode 100644 include/modules/botserv/info.h create mode 100644 include/modules/botserv/kick.h delete mode 100644 include/modules/bs_badwords.h delete mode 100644 include/modules/bs_bot.h delete mode 100644 include/modules/bs_info.h delete mode 100644 include/modules/bs_kick.h create mode 100644 include/modules/chanserv/access.h create mode 100644 include/modules/chanserv/akick.h create mode 100644 include/modules/chanserv/drop.h create mode 100644 include/modules/chanserv/entrymsg.h create mode 100644 include/modules/chanserv/info.h create mode 100644 include/modules/chanserv/log.h create mode 100644 include/modules/chanserv/mode.h create mode 100644 include/modules/chanserv/set.h create mode 100644 include/modules/chanserv/set_misc.h create mode 100644 include/modules/chanserv/suspend.h delete mode 100644 include/modules/cs_access.h delete mode 100644 include/modules/cs_akick.h delete mode 100644 include/modules/cs_drop.h delete mode 100644 include/modules/cs_entrymsg.h delete mode 100644 include/modules/cs_info.h delete mode 100644 include/modules/cs_log.h delete mode 100644 include/modules/cs_mode.h delete mode 100644 include/modules/cs_set.h delete mode 100644 include/modules/cs_set_misc.h delete mode 100644 include/modules/cs_suspend.h create mode 100644 include/modules/hostserv/del.h delete mode 100644 include/modules/hs_del.h create mode 100644 include/modules/nickserv/access.h create mode 100644 include/modules/nickserv/ajoin.h create mode 100644 include/modules/nickserv/cert.h create mode 100644 include/modules/nickserv/drop.h create mode 100644 include/modules/nickserv/group.h create mode 100644 include/modules/nickserv/info.h create mode 100644 include/modules/nickserv/set.h create mode 100644 include/modules/nickserv/set_misc.h create mode 100644 include/modules/nickserv/suspend.h create mode 100644 include/modules/nickserv/update.h delete mode 100644 include/modules/ns_access.h delete mode 100644 include/modules/ns_ajoin.h delete mode 100644 include/modules/ns_cert.h delete mode 100644 include/modules/ns_drop.h delete mode 100644 include/modules/ns_group.h delete mode 100644 include/modules/ns_info.h delete mode 100644 include/modules/ns_set.h delete mode 100644 include/modules/ns_set_misc.h delete mode 100644 include/modules/ns_suspend.h delete mode 100644 include/modules/ns_update.h create mode 100644 include/modules/operserv/defcon.h create mode 100644 include/modules/operserv/dns.h create mode 100644 include/modules/operserv/forbid.h create mode 100644 include/modules/operserv/ignore.h create mode 100644 include/modules/operserv/info.h create mode 100644 include/modules/operserv/news.h create mode 100644 include/modules/operserv/session.h delete mode 100644 include/modules/os_defcon.h delete mode 100644 include/modules/os_dns.h delete mode 100644 include/modules/os_forbid.h delete mode 100644 include/modules/os_ignore.h delete mode 100644 include/modules/os_info.h delete mode 100644 include/modules/os_news.h delete mode 100644 include/modules/os_session.h diff --git a/include/modules/botserv/badwords.h b/include/modules/botserv/badwords.h new file mode 100644 index 000000000..87986ee62 --- /dev/null +++ b/include/modules/botserv/badwords.h @@ -0,0 +1,102 @@ +/* BotServ core functions + * + * (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. + * + * + */ + +/** Flags for badwords + */ +enum BadWordType +{ + /* Always kicks if the word is said */ + BW_ANY, + /* User must say the entire word */ + BW_SINGLE, + /* The word has to start with the badword */ + BW_START, + /* The word has to end with the badword */ + BW_END +}; + +/* Structure used to contain bad words. */ +class BadWord : public Serialize::Object +{ + protected: + using Serialize::Object::Object; + public: + virtual ~BadWord() = default; + + virtual ChanServ::Channel *GetChannel() anope_abstract; + virtual void SetChannel(ChanServ::Channel *) anope_abstract; + + virtual Anope::string GetWord() anope_abstract; + virtual void SetWord(const Anope::string &) anope_abstract; + + virtual BadWordType GetType() anope_abstract; + virtual void SetType(const BadWordType &) anope_abstract; +}; + +static Serialize::TypeReference badword("BadWord"); + +struct BadWords : public Service +{ + BadWords(Module *me) : Service(me, "BadWords", "badwords") { } + + /** Add a badword to the badword list + * @param word The badword + * @param type The type (SINGLE START END) + * @return The badword + */ + virtual BadWord* AddBadWord(ChanServ::Channel *, const Anope::string &word, BadWordType type) anope_abstract; + + virtual std::vector GetBadWords(ChanServ::Channel *ci) anope_abstract; + + /** Get a badword structure by index + * @param index The index + * @return The badword + */ + virtual BadWord* GetBadWord(ChanServ::Channel *, unsigned index) anope_abstract; + + /** Get how many badwords are on this channel + * @return The number of badwords in the vector + */ + virtual unsigned GetBadWordCount(ChanServ::Channel *) anope_abstract; + + /** Remove a badword + * @param index The index of the badword + */ + virtual void EraseBadWord(ChanServ::Channel *, unsigned index) anope_abstract; + + /** Clear all badwords from the channel + */ + virtual void ClearBadWords(ChanServ::Channel *) anope_abstract; +}; + +static ServiceReference badwords("BadWords", "badwords"); + +namespace Event +{ + struct CoreExport BadWordEvents : Events + { + /** Called before a badword is added to the badword list + * @param ci The channel + * @param bw The badword + */ + virtual void OnBadWordAdd(ChanServ::Channel *ci, const BadWord *bw) anope_abstract; + + /** Called before a badword is deleted from a channel + * @param ci The channel + * @param bw The badword + */ + virtual void OnBadWordDel(ChanServ::Channel *ci, const BadWord *bw) anope_abstract; + }; +} + +template<> struct EventName { static constexpr const char *const name = "Badwords"; }; diff --git a/include/modules/botserv/bot.h b/include/modules/botserv/bot.h new file mode 100644 index 000000000..fe6534309 --- /dev/null +++ b/include/modules/botserv/bot.h @@ -0,0 +1,38 @@ +/* + * (C) 2014 Anope Team + * Contact us at team@anope.org + * + * Please read COPYING and README for further details. + * + */ + +namespace Event +{ + struct CoreExport BotCreate : Events + { + /** Called when a new bot is made + * @param bi The bot + */ + virtual void OnBotCreate(ServiceBot *bi) anope_abstract; + }; + + struct CoreExport BotChange : Events + { + /** Called when a bot is changed + * @param bi The bot + */ + virtual void OnBotChange(ServiceBot *bi) anope_abstract; + }; + + struct CoreExport BotDelete : Events + { + /** Called when a bot is deleted + * @param bi The bot + */ + virtual void OnBotDelete(ServiceBot *bi) anope_abstract; + }; +} + +template<> struct EventName { static constexpr const char *const name = "OnBotCreate"; }; +template<> struct EventName { static constexpr const char *const name = "OnBotChange"; }; +template<> struct EventName { static constexpr const char *const name = "OnBotDelete"; }; diff --git a/include/modules/botserv/info.h b/include/modules/botserv/info.h new file mode 100644 index 000000000..1ebd58c89 --- /dev/null +++ b/include/modules/botserv/info.h @@ -0,0 +1,21 @@ +/* + * + * (C) 2014 Anope Team + * Contact us at team@anope.org + * + * Please read COPYING and README for further details. + * + */ + +namespace Event +{ + struct CoreExport ServiceBotEvent : Events + { + /** Called when a user uses botserv/info on a bot or channel. + */ + virtual void OnServiceBot(CommandSource &source, ServiceBot *bi, ChanServ::Channel *ci, InfoFormatter &info) anope_abstract; + }; + extern CoreExport EventHandlers OnServiceBot; +} + +template<> struct EventName { static constexpr const char *const name = "OnServiceBot"; }; diff --git a/include/modules/botserv/kick.h b/include/modules/botserv/kick.h new file mode 100644 index 000000000..1346d7427 --- /dev/null +++ b/include/modules/botserv/kick.h @@ -0,0 +1,132 @@ +/* BotServ core functions + * + * (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. + * + * + */ + +class KickerData : public Serialize::Object +{ + protected: + using Serialize::Object::Object; + + public: + virtual ChanServ::Channel *GetChannel() anope_abstract; + virtual void SetChannel(ChanServ::Channel *) anope_abstract; + + virtual bool GetAmsgs() anope_abstract; + virtual void SetAmsgs(const bool &) anope_abstract; + + virtual bool GetBadwords() anope_abstract; + virtual void SetBadwords(const bool &) anope_abstract; + + virtual bool GetBolds() anope_abstract; + virtual void SetBolds(const bool &) anope_abstract; + + virtual bool GetCaps() anope_abstract; + virtual void SetCaps(const bool &) anope_abstract; + + virtual bool GetColors() anope_abstract; + virtual void SetColors(const bool &) anope_abstract; + + virtual bool GetFlood() anope_abstract; + virtual void SetFlood(const bool &) anope_abstract; + + virtual bool GetItalics() anope_abstract; + virtual void SetItalics(const bool &) anope_abstract; + + virtual bool GetRepeat() anope_abstract; + virtual void SetRepeat(const bool &) anope_abstract; + + virtual bool GetReverses() anope_abstract; + virtual void SetReverses(const bool &) anope_abstract; + + virtual bool GetUnderlines() anope_abstract; + virtual void SetUnderlines(const bool &) anope_abstract; + + virtual int16_t GetTTBBolds() anope_abstract; + virtual void SetTTBBolds(const int16_t &) anope_abstract; + + virtual int16_t GetTTBColors() anope_abstract; + virtual void SetTTBColors(const int16_t &) anope_abstract; + + virtual int16_t GetTTBReverses() anope_abstract; + virtual void SetTTBReverses(const int16_t &) anope_abstract; + + virtual int16_t GetTTBUnderlines() anope_abstract; + virtual void SetTTBUnderlines(const int16_t &) anope_abstract; + + virtual int16_t GetTTBBadwords() anope_abstract; + virtual void SetTTBBadwords(const int16_t &) anope_abstract; + + virtual int16_t GetTTBCaps() anope_abstract; + virtual void SetTTBCaps(const int16_t &) anope_abstract; + + virtual int16_t GetTTBFlood() anope_abstract; + virtual void SetTTBFlood(const int16_t &) anope_abstract; + + virtual int16_t GetTTBRepeat() anope_abstract; + virtual void SetTTBRepeat(const int16_t &) anope_abstract; + + virtual int16_t GetTTBItalics() anope_abstract; + virtual void SetTTBItalics(const int16_t &) anope_abstract; + + virtual int16_t GetTTBAmsgs() anope_abstract; + virtual void SetTTBAmsgs(const int16_t &) anope_abstract; + + virtual int16_t GetCapsMin() anope_abstract; + virtual void SetCapsMin(const int16_t &) anope_abstract; + + virtual int16_t GetCapsPercent() anope_abstract; + virtual void SetCapsPercent(const int16_t &) anope_abstract; + + virtual int16_t GetFloodLines() anope_abstract; + virtual void SetFloodLines(const int16_t &) anope_abstract; + + virtual int16_t GetFloodSecs() anope_abstract; + virtual void SetFloodSecs(const int16_t &) anope_abstract; + + virtual int16_t GetRepeatTimes() anope_abstract; + virtual void SetRepeatTimes(const int16_t &) anope_abstract; + + virtual bool GetDontKickOps() anope_abstract; + virtual void SetDontKickOps(const bool &) anope_abstract; + + virtual bool GetDontKickVoices() anope_abstract; + virtual void SetDontKickVoices(const bool &) anope_abstract; +}; + +static Serialize::TypeReference kickerdata("KickerData"); + +inline KickerData *GetKickerData(ChanServ::Channel *ci) +{ + KickerData *kd = ci->GetRef(kickerdata); + if (!kd && kickerdata) + { + kd = kickerdata.Create(); + kd->SetChannel(ci); + } + return kd; +} + +namespace Event +{ + struct CoreExport BotBan : Events + { + /** Called when a bot places a ban + * @param u User being banned + * @param ci Channel the ban is placed on + * @param mask The mask being banned + */ + virtual void OnBotBan(User *u, ChanServ::Channel *ci, const Anope::string &mask) anope_abstract; + }; +} + +template<> struct EventName { static constexpr const char *const name = "OnBotBan"; }; + diff --git a/include/modules/bs_badwords.h b/include/modules/bs_badwords.h deleted file mode 100644 index 87986ee62..000000000 --- a/include/modules/bs_badwords.h +++ /dev/null @@ -1,102 +0,0 @@ -/* BotServ core functions - * - * (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. - * - * - */ - -/** Flags for badwords - */ -enum BadWordType -{ - /* Always kicks if the word is said */ - BW_ANY, - /* User must say the entire word */ - BW_SINGLE, - /* The word has to start with the badword */ - BW_START, - /* The word has to end with the badword */ - BW_END -}; - -/* Structure used to contain bad words. */ -class BadWord : public Serialize::Object -{ - protected: - using Serialize::Object::Object; - public: - virtual ~BadWord() = default; - - virtual ChanServ::Channel *GetChannel() anope_abstract; - virtual void SetChannel(ChanServ::Channel *) anope_abstract; - - virtual Anope::string GetWord() anope_abstract; - virtual void SetWord(const Anope::string &) anope_abstract; - - virtual BadWordType GetType() anope_abstract; - virtual void SetType(const BadWordType &) anope_abstract; -}; - -static Serialize::TypeReference badword("BadWord"); - -struct BadWords : public Service -{ - BadWords(Module *me) : Service(me, "BadWords", "badwords") { } - - /** Add a badword to the badword list - * @param word The badword - * @param type The type (SINGLE START END) - * @return The badword - */ - virtual BadWord* AddBadWord(ChanServ::Channel *, const Anope::string &word, BadWordType type) anope_abstract; - - virtual std::vector GetBadWords(ChanServ::Channel *ci) anope_abstract; - - /** Get a badword structure by index - * @param index The index - * @return The badword - */ - virtual BadWord* GetBadWord(ChanServ::Channel *, unsigned index) anope_abstract; - - /** Get how many badwords are on this channel - * @return The number of badwords in the vector - */ - virtual unsigned GetBadWordCount(ChanServ::Channel *) anope_abstract; - - /** Remove a badword - * @param index The index of the badword - */ - virtual void EraseBadWord(ChanServ::Channel *, unsigned index) anope_abstract; - - /** Clear all badwords from the channel - */ - virtual void ClearBadWords(ChanServ::Channel *) anope_abstract; -}; - -static ServiceReference badwords("BadWords", "badwords"); - -namespace Event -{ - struct CoreExport BadWordEvents : Events - { - /** Called before a badword is added to the badword list - * @param ci The channel - * @param bw The badword - */ - virtual void OnBadWordAdd(ChanServ::Channel *ci, const BadWord *bw) anope_abstract; - - /** Called before a badword is deleted from a channel - * @param ci The channel - * @param bw The badword - */ - virtual void OnBadWordDel(ChanServ::Channel *ci, const BadWord *bw) anope_abstract; - }; -} - -template<> struct EventName { static constexpr const char *const name = "Badwords"; }; diff --git a/include/modules/bs_bot.h b/include/modules/bs_bot.h deleted file mode 100644 index fe6534309..000000000 --- a/include/modules/bs_bot.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * (C) 2014 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for further details. - * - */ - -namespace Event -{ - struct CoreExport BotCreate : Events - { - /** Called when a new bot is made - * @param bi The bot - */ - virtual void OnBotCreate(ServiceBot *bi) anope_abstract; - }; - - struct CoreExport BotChange : Events - { - /** Called when a bot is changed - * @param bi The bot - */ - virtual void OnBotChange(ServiceBot *bi) anope_abstract; - }; - - struct CoreExport BotDelete : Events - { - /** Called when a bot is deleted - * @param bi The bot - */ - virtual void OnBotDelete(ServiceBot *bi) anope_abstract; - }; -} - -template<> struct EventName { static constexpr const char *const name = "OnBotCreate"; }; -template<> struct EventName { static constexpr const char *const name = "OnBotChange"; }; -template<> struct EventName { static constexpr const char *const name = "OnBotDelete"; }; diff --git a/include/modules/bs_info.h b/include/modules/bs_info.h deleted file mode 100644 index 1ebd58c89..000000000 --- a/include/modules/bs_info.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * - * (C) 2014 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for further details. - * - */ - -namespace Event -{ - struct CoreExport ServiceBotEvent : Events - { - /** Called when a user uses botserv/info on a bot or channel. - */ - virtual void OnServiceBot(CommandSource &source, ServiceBot *bi, ChanServ::Channel *ci, InfoFormatter &info) anope_abstract; - }; - extern CoreExport EventHandlers OnServiceBot; -} - -template<> struct EventName { static constexpr const char *const name = "OnServiceBot"; }; diff --git a/include/modules/bs_kick.h b/include/modules/bs_kick.h deleted file mode 100644 index 1346d7427..000000000 --- a/include/modules/bs_kick.h +++ /dev/null @@ -1,132 +0,0 @@ -/* BotServ core functions - * - * (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. - * - * - */ - -class KickerData : public Serialize::Object -{ - protected: - using Serialize::Object::Object; - - public: - virtual ChanServ::Channel *GetChannel() anope_abstract; - virtual void SetChannel(ChanServ::Channel *) anope_abstract; - - virtual bool GetAmsgs() anope_abstract; - virtual void SetAmsgs(const bool &) anope_abstract; - - virtual bool GetBadwords() anope_abstract; - virtual void SetBadwords(const bool &) anope_abstract; - - virtual bool GetBolds() anope_abstract; - virtual void SetBolds(const bool &) anope_abstract; - - virtual bool GetCaps() anope_abstract; - virtual void SetCaps(const bool &) anope_abstract; - - virtual bool GetColors() anope_abstract; - virtual void SetColors(const bool &) anope_abstract; - - virtual bool GetFlood() anope_abstract; - virtual void SetFlood(const bool &) anope_abstract; - - virtual bool GetItalics() anope_abstract; - virtual void SetItalics(const bool &) anope_abstract; - - virtual bool GetRepeat() anope_abstract; - virtual void SetRepeat(const bool &) anope_abstract; - - virtual bool GetReverses() anope_abstract; - virtual void SetReverses(const bool &) anope_abstract; - - virtual bool GetUnderlines() anope_abstract; - virtual void SetUnderlines(const bool &) anope_abstract; - - virtual int16_t GetTTBBolds() anope_abstract; - virtual void SetTTBBolds(const int16_t &) anope_abstract; - - virtual int16_t GetTTBColors() anope_abstract; - virtual void SetTTBColors(const int16_t &) anope_abstract; - - virtual int16_t GetTTBReverses() anope_abstract; - virtual void SetTTBReverses(const int16_t &) anope_abstract; - - virtual int16_t GetTTBUnderlines() anope_abstract; - virtual void SetTTBUnderlines(const int16_t &) anope_abstract; - - virtual int16_t GetTTBBadwords() anope_abstract; - virtual void SetTTBBadwords(const int16_t &) anope_abstract; - - virtual int16_t GetTTBCaps() anope_abstract; - virtual void SetTTBCaps(const int16_t &) anope_abstract; - - virtual int16_t GetTTBFlood() anope_abstract; - virtual void SetTTBFlood(const int16_t &) anope_abstract; - - virtual int16_t GetTTBRepeat() anope_abstract; - virtual void SetTTBRepeat(const int16_t &) anope_abstract; - - virtual int16_t GetTTBItalics() anope_abstract; - virtual void SetTTBItalics(const int16_t &) anope_abstract; - - virtual int16_t GetTTBAmsgs() anope_abstract; - virtual void SetTTBAmsgs(const int16_t &) anope_abstract; - - virtual int16_t GetCapsMin() anope_abstract; - virtual void SetCapsMin(const int16_t &) anope_abstract; - - virtual int16_t GetCapsPercent() anope_abstract; - virtual void SetCapsPercent(const int16_t &) anope_abstract; - - virtual int16_t GetFloodLines() anope_abstract; - virtual void SetFloodLines(const int16_t &) anope_abstract; - - virtual int16_t GetFloodSecs() anope_abstract; - virtual void SetFloodSecs(const int16_t &) anope_abstract; - - virtual int16_t GetRepeatTimes() anope_abstract; - virtual void SetRepeatTimes(const int16_t &) anope_abstract; - - virtual bool GetDontKickOps() anope_abstract; - virtual void SetDontKickOps(const bool &) anope_abstract; - - virtual bool GetDontKickVoices() anope_abstract; - virtual void SetDontKickVoices(const bool &) anope_abstract; -}; - -static Serialize::TypeReference kickerdata("KickerData"); - -inline KickerData *GetKickerData(ChanServ::Channel *ci) -{ - KickerData *kd = ci->GetRef(kickerdata); - if (!kd && kickerdata) - { - kd = kickerdata.Create(); - kd->SetChannel(ci); - } - return kd; -} - -namespace Event -{ - struct CoreExport BotBan : Events - { - /** Called when a bot places a ban - * @param u User being banned - * @param ci Channel the ban is placed on - * @param mask The mask being banned - */ - virtual void OnBotBan(User *u, ChanServ::Channel *ci, const Anope::string &mask) anope_abstract; - }; -} - -template<> struct EventName { static constexpr const char *const name = "OnBotBan"; }; - diff --git a/include/modules/chanserv/access.h b/include/modules/chanserv/access.h new file mode 100644 index 000000000..54eb3f353 --- /dev/null +++ b/include/modules/chanserv/access.h @@ -0,0 +1,28 @@ +/* + * + * (C) 2014 Anope Team + * Contact us at team@anope.org + * + * Please read COPYING and README for further details. + * + */ + +static Serialize::TypeReference accesschanaccess("AccessChanAccess"); +static Serialize::TypeReference flagschanaccess("FlagsChanAccess"); +static Serialize::TypeReference xopchanaccess("XOPChanAccess"); + +namespace Event +{ + struct CoreExport LevelChange : Events + { + /** Called when a level for a channel is changed + * @param source The source of the command + * @param ci The channel the level was changed on + * @param priv The privilege changed + * @param what The new level + */ + virtual void OnLevelChange(CommandSource &source, ChanServ::Channel *ci, const Anope::string &priv, int16_t what) anope_abstract; + }; +} + +template<> struct EventName { static constexpr const char *const name = "OnLevelChange"; }; diff --git a/include/modules/chanserv/akick.h b/include/modules/chanserv/akick.h new file mode 100644 index 000000000..966dac15b --- /dev/null +++ b/include/modules/chanserv/akick.h @@ -0,0 +1,64 @@ +/* + * + * (C) 2014 Anope Team + * Contact us at team@anope.org + * + * Please read COPYING and README for further details. + * + */ + +#include "modules/nickserv.h" + + /* AutoKick data. */ +class CoreExport AutoKick : public Serialize::Object +{ + protected: + using Serialize::Object::Object; + public: + virtual ~AutoKick() = default; + + virtual ChanServ::Channel *GetChannel() anope_abstract; + virtual void SetChannel(ChanServ::Channel *) anope_abstract; + + virtual Anope::string GetMask() anope_abstract; + virtual void SetMask(const Anope::string &) anope_abstract; + + virtual NickServ::Account *GetAccount() anope_abstract; + virtual void SetAccount(NickServ::Account *) anope_abstract; + + virtual Anope::string GetReason() anope_abstract; + virtual void SetReason(const Anope::string &) anope_abstract; + + virtual Anope::string GetCreator() anope_abstract; + virtual void SetCreator(const Anope::string &) anope_abstract; + + virtual time_t GetAddTime() anope_abstract; + virtual void SetAddTime(const time_t &) anope_abstract; + + virtual time_t GetLastUsed() anope_abstract; + virtual void SetLastUsed(const time_t &) anope_abstract; +}; + +static Serialize::TypeReference autokick("AutoKick"); + +namespace Event +{ + struct CoreExport Akick : Events + { + /** Called after adding an akick to a channel + * @param source The source of the command + * @param ci The channel + * @param ak The akick + */ + virtual void OnAkickAdd(CommandSource &source, ChanServ::Channel *ci, const AutoKick *ak) anope_abstract; + + /** Called before removing an akick from a channel + * @param source The source of the command + * @param ci The channel + * @param ak The akick + */ + virtual void OnAkickDel(CommandSource &source, ChanServ::Channel *ci, const AutoKick *ak) anope_abstract; + }; +} + +template<> struct EventName { static constexpr const char *const name = "Akick"; }; diff --git a/include/modules/chanserv/drop.h b/include/modules/chanserv/drop.h new file mode 100644 index 000000000..db231059b --- /dev/null +++ b/include/modules/chanserv/drop.h @@ -0,0 +1,22 @@ +/* + * + * (C) 2014 Anope Team + * Contact us at team@anope.org + * + * Please read COPYING and README for further details. + * + */ + +namespace Event +{ + struct CoreExport ChanDrop : Events + { + /** Called right before a channel is dropped + * @param source The user dropping the channel + * @param ci The channel + */ + virtual EventReturn OnChanDrop(CommandSource &source, ChanServ::Channel *ci) anope_abstract; + }; +} + +template<> struct EventName { static constexpr const char *const name = "OnChanDrop"; }; diff --git a/include/modules/chanserv/entrymsg.h b/include/modules/chanserv/entrymsg.h new file mode 100644 index 000000000..b5804068f --- /dev/null +++ b/include/modules/chanserv/entrymsg.h @@ -0,0 +1,29 @@ +/* + * (C) 2003-2014 Anope Team + * Contact us at team@anope.org + * + * Please read COPYING and README for further details. + * + */ + +class EntryMsg : public Serialize::Object +{ + protected: + using Serialize::Object::Object; + + public: + virtual ChanServ::Channel *GetChannel() anope_abstract; + virtual void SetChannel(ChanServ::Channel *) anope_abstract; + + virtual Anope::string GetCreator() anope_abstract; + virtual void SetCreator(const Anope::string &) anope_abstract; + + virtual Anope::string GetMessage() anope_abstract; + virtual void SetMessage(const Anope::string &) anope_abstract; + + virtual time_t GetWhen() anope_abstract; + virtual void SetWhen(const time_t &) anope_abstract; +}; + +static Serialize::TypeReference entrymsg("EntryMsg"); + diff --git a/include/modules/chanserv/info.h b/include/modules/chanserv/info.h new file mode 100644 index 000000000..f80e3daf2 --- /dev/null +++ b/include/modules/chanserv/info.h @@ -0,0 +1,24 @@ +/* + * + * (C) 2014 Anope Team + * Contact us at team@anope.org + * + * Please read COPYING and README for further details. + * + */ + +namespace Event +{ + struct CoreExport ChanInfo : Events + { + /** Called when a user requests info for a channel + * @param source The user requesting info + * @param ci The channel the user is requesting info for + * @param info Data to show the user requesting information + * @param show_hidden true if we should show the user everything + */ + virtual void OnChanInfo(CommandSource &source, ChanServ::Channel *ci, InfoFormatter &info, bool show_hidden) anope_abstract; + }; +} + +template<> struct EventName { static constexpr const char *const name = "OnChanInfo"; }; diff --git a/include/modules/chanserv/log.h b/include/modules/chanserv/log.h new file mode 100644 index 000000000..d940f5e87 --- /dev/null +++ b/include/modules/chanserv/log.h @@ -0,0 +1,44 @@ +/* ChanServ core functions + * + * (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. + */ + +class LogSetting : public Serialize::Object +{ + protected: + using Serialize::Object::Object; + + public: + virtual ChanServ::Channel *GetChannel() anope_abstract; + virtual void SetChannel(ChanServ::Channel *) anope_abstract; + + virtual Anope::string GetServiceName() anope_abstract; + virtual void SetServiceName(const Anope::string &) anope_abstract; + + virtual Anope::string GetCommandService() anope_abstract; + virtual void SetCommandService(const Anope::string &) anope_abstract; + + virtual Anope::string GetCommandName() anope_abstract; + virtual void SetCommandName(const Anope::string &) anope_abstract; + + virtual Anope::string GetMethod() anope_abstract; + virtual void SetMethod(const Anope::string &) anope_abstract; + + virtual Anope::string GetExtra() anope_abstract; + virtual void SetExtra(const Anope::string &) anope_abstract; + + virtual Anope::string GetCreator() anope_abstract; + virtual void SetCreator(const Anope::string &) anope_abstract; + + virtual time_t GetCreated() anope_abstract; + virtual void SetCreated(const time_t &) anope_abstract; +}; + +static Serialize::TypeReference logsetting("LogSetting"); + diff --git a/include/modules/chanserv/mode.h b/include/modules/chanserv/mode.h new file mode 100644 index 000000000..4c7965e2a --- /dev/null +++ b/include/modules/chanserv/mode.h @@ -0,0 +1,123 @@ +/* ChanServ core functions + * + * (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. + */ + +class ModeLock : public Serialize::Object +{ + protected: + using Serialize::Object::Object; + + public: + virtual ChanServ::Channel *GetChannel() anope_abstract; + virtual void SetChannel(ChanServ::Channel *) anope_abstract; + + virtual bool GetSet() anope_abstract; + virtual void SetSet(const bool &) anope_abstract; + + virtual Anope::string GetName() anope_abstract; + virtual void SetName(const Anope::string &) anope_abstract; + + virtual Anope::string GetParam() anope_abstract; + virtual void SetParam(const Anope::string &) anope_abstract; + + virtual Anope::string GetSetter() anope_abstract; + virtual void SetSetter(const Anope::string &) anope_abstract; + + virtual time_t GetCreated() anope_abstract; + virtual void SetCreated(const time_t &) anope_abstract; +}; + +static Serialize::TypeReference modelock("ModeLock"); + +class ModeLocks : public Service +{ + public: + ModeLocks(Module *me) : Service(me, "ModeLocks", "mlocks") { } + + typedef std::vector ModeList; + + /** Check if a mode is mlocked + * @param mode The mode + * @param An optional param + * @param status True to check mlock on, false for mlock off + * @return true on success, false on fail + */ + virtual bool HasMLock(ChanServ::Channel *, ChannelMode *mode, const Anope::string ¶m, bool status) const anope_abstract; + + /** Set a mlock + * @param mode The mode + * @param status True for mlock on, false for mlock off + * @param param An optional param arg for + mlocked modes + * @param setter Who is setting the mlock + * @param created When the mlock was created + * @return true on success, false on failure (module blocking) + */ + virtual bool SetMLock(ChanServ::Channel *, ChannelMode *mode, bool status, const Anope::string ¶m = "", Anope::string setter = "", time_t created = Anope::CurTime) anope_abstract; + + /** Remove a mlock + * @param mode The mode + * @param status True for mlock on, false for mlock off + * @param param The param of the mode, required if it is a list or status mode + * @return true on success, false on failure + */ + virtual bool RemoveMLock(ChanServ::Channel *, ChannelMode *mode, bool status, const Anope::string ¶m = "") anope_abstract; + + /** Clear all mlocks on the channel + */ + virtual void ClearMLock(ChanServ::Channel *) anope_abstract; + + /** Get all of the mlocks for this channel + * @return The mlocks + */ + virtual ModeList GetMLock(ChanServ::Channel *) const anope_abstract; + + /** Get a list of mode locks on a channel + * @param name The mode name to get a list of + * @return a list of mlocks for the given mode + */ + virtual std::list GetModeLockList(ChanServ::Channel *, const Anope::string &name) anope_abstract; + + /** Get details for a specific mlock + * @param mname The mode name + * @param An optional param to match with + * @return The MLock, if any + */ + virtual ModeLock *GetMLock(ChanServ::Channel *, const Anope::string &mname, const Anope::string ¶m = "") anope_abstract; + + /** Get the current mode locks as a string + * @param complete True to show mlock parameters as well + * @return A string of mode locks, eg: +nrt + */ + virtual Anope::string GetMLockAsString(ChanServ::Channel *, bool complete) const anope_abstract; +}; + +static ServiceReference mlocks("ModeLocks", "mlocks"); + +namespace Event +{ + struct CoreExport MLockEvents : Events + { + /** Called when a mode is about to be mlocked + * @param ci The channel the mode is being locked on + * @param lock The mode lock + * @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to deny the mlock. + */ + virtual EventReturn OnMLock(ChanServ::Channel *ci, ModeLock *lock) anope_abstract; + + /** Called when a mode is about to be unlocked + * @param ci The channel the mode is being unlocked from + * @param lock The mode lock + * @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to deny the mlock. + */ + virtual EventReturn OnUnMLock(ChanServ::Channel *ci, ModeLock *lock) anope_abstract; + }; +} + +template<> struct EventName { static constexpr const char *const name = "MLock"; }; diff --git a/include/modules/chanserv/set.h b/include/modules/chanserv/set.h new file mode 100644 index 000000000..a0e81c888 --- /dev/null +++ b/include/modules/chanserv/set.h @@ -0,0 +1,26 @@ +/* + * + * (C) 2014 Anope Team + * Contact us at team@anope.org + * + * Please read COPYING and README for further details. + * + */ + +namespace Event +{ + struct CoreExport SetChannelOption : Events + { + /** Called when a chanserv/set command is used + * @param source The source of the command + * @param cmd The command + * @param ci The channel the command was used on + * @param setting The setting passed to the command. Probably ON/OFF. + * @return EVENT_ALLOW to bypass access checks, EVENT_STOP to halt immediately. + */ + virtual EventReturn OnSetChannelOption(CommandSource &source, Command *cmd, ChanServ::Channel *ci, const Anope::string &setting) anope_abstract; + }; + static EventHandlersReference OnSetChannelOption; +} + +template<> struct EventName { static constexpr const char *const name = "OnSetChannelOption"; }; diff --git a/include/modules/chanserv/set_misc.h b/include/modules/chanserv/set_misc.h new file mode 100644 index 000000000..65b92cc89 --- /dev/null +++ b/include/modules/chanserv/set_misc.h @@ -0,0 +1,25 @@ +/* + * (C) 2014 Anope Team + * Contact us at team@anope.org + * + * Please read COPYING and README for further details. + */ + +class CSMiscData : public Serialize::Object +{ + protected: + using Serialize::Object::Object; + + public: + virtual ChanServ::Channel *GetChannel() anope_abstract; + virtual void SetChannel(ChanServ::Channel *) anope_abstract; + + virtual Anope::string GetName() anope_abstract; + virtual void SetName(const Anope::string &) anope_abstract; + + virtual Anope::string GetData() anope_abstract; + virtual void SetData(const Anope::string &) anope_abstract; +}; + +static Serialize::TypeReference csmiscdata("CSMiscData"); + diff --git a/include/modules/chanserv/suspend.h b/include/modules/chanserv/suspend.h new file mode 100644 index 000000000..27187ea09 --- /dev/null +++ b/include/modules/chanserv/suspend.h @@ -0,0 +1,53 @@ +/* + * (C) 2014 Anope Team + * Contact us at team@anope.org + * + * Please read COPYING and README for further details. + * + */ + +class CSSuspendInfo : public Serialize::Object +{ + protected: + using Serialize::Object::Object; + + public: + virtual ChanServ::Channel *GetChannel() anope_abstract; + virtual void SetChannel(ChanServ::Channel *) anope_abstract; + + virtual Anope::string GetBy() anope_abstract; + virtual void SetBy(const Anope::string &) anope_abstract; + + virtual Anope::string GetReason() anope_abstract; + virtual void SetReason(const Anope::string &) anope_abstract; + + virtual time_t GetWhen() anope_abstract; + virtual void SetWhen(const time_t &) anope_abstract; + + virtual time_t GetExpires() anope_abstract; + virtual void SetExpires(const time_t &) anope_abstract; +}; + +static Serialize::TypeReference cssuspendinfo("CSSuspendInfo"); + +namespace Event +{ + struct CoreExport ChanSuspend : Events + { + /** Called when a channel is suspended + * @param ci The channel + */ + virtual void OnChanSuspend(ChanServ::Channel *ci) anope_abstract; + }; + struct CoreExport ChanUnsuspend : Events + { + /** Called when a channel is unsuspended + * @param ci The channel + */ + virtual void OnChanUnsuspend(ChanServ::Channel *ci) anope_abstract; + }; + extern CoreExport EventHandlers OnChanUnsuspend; +} + +template<> struct EventName { static constexpr const char *const name = "OnChanSuspend"; }; +template<> struct EventName { static constexpr const char *const name = "OnChanUnsuspend"; }; diff --git a/include/modules/cs_access.h b/include/modules/cs_access.h deleted file mode 100644 index 54eb3f353..000000000 --- a/include/modules/cs_access.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * - * (C) 2014 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for further details. - * - */ - -static Serialize::TypeReference accesschanaccess("AccessChanAccess"); -static Serialize::TypeReference flagschanaccess("FlagsChanAccess"); -static Serialize::TypeReference xopchanaccess("XOPChanAccess"); - -namespace Event -{ - struct CoreExport LevelChange : Events - { - /** Called when a level for a channel is changed - * @param source The source of the command - * @param ci The channel the level was changed on - * @param priv The privilege changed - * @param what The new level - */ - virtual void OnLevelChange(CommandSource &source, ChanServ::Channel *ci, const Anope::string &priv, int16_t what) anope_abstract; - }; -} - -template<> struct EventName { static constexpr const char *const name = "OnLevelChange"; }; diff --git a/include/modules/cs_akick.h b/include/modules/cs_akick.h deleted file mode 100644 index 966dac15b..000000000 --- a/include/modules/cs_akick.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * - * (C) 2014 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for further details. - * - */ - -#include "modules/nickserv.h" - - /* AutoKick data. */ -class CoreExport AutoKick : public Serialize::Object -{ - protected: - using Serialize::Object::Object; - public: - virtual ~AutoKick() = default; - - virtual ChanServ::Channel *GetChannel() anope_abstract; - virtual void SetChannel(ChanServ::Channel *) anope_abstract; - - virtual Anope::string GetMask() anope_abstract; - virtual void SetMask(const Anope::string &) anope_abstract; - - virtual NickServ::Account *GetAccount() anope_abstract; - virtual void SetAccount(NickServ::Account *) anope_abstract; - - virtual Anope::string GetReason() anope_abstract; - virtual void SetReason(const Anope::string &) anope_abstract; - - virtual Anope::string GetCreator() anope_abstract; - virtual void SetCreator(const Anope::string &) anope_abstract; - - virtual time_t GetAddTime() anope_abstract; - virtual void SetAddTime(const time_t &) anope_abstract; - - virtual time_t GetLastUsed() anope_abstract; - virtual void SetLastUsed(const time_t &) anope_abstract; -}; - -static Serialize::TypeReference autokick("AutoKick"); - -namespace Event -{ - struct CoreExport Akick : Events - { - /** Called after adding an akick to a channel - * @param source The source of the command - * @param ci The channel - * @param ak The akick - */ - virtual void OnAkickAdd(CommandSource &source, ChanServ::Channel *ci, const AutoKick *ak) anope_abstract; - - /** Called before removing an akick from a channel - * @param source The source of the command - * @param ci The channel - * @param ak The akick - */ - virtual void OnAkickDel(CommandSource &source, ChanServ::Channel *ci, const AutoKick *ak) anope_abstract; - }; -} - -template<> struct EventName { static constexpr const char *const name = "Akick"; }; diff --git a/include/modules/cs_drop.h b/include/modules/cs_drop.h deleted file mode 100644 index db231059b..000000000 --- a/include/modules/cs_drop.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * - * (C) 2014 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for further details. - * - */ - -namespace Event -{ - struct CoreExport ChanDrop : Events - { - /** Called right before a channel is dropped - * @param source The user dropping the channel - * @param ci The channel - */ - virtual EventReturn OnChanDrop(CommandSource &source, ChanServ::Channel *ci) anope_abstract; - }; -} - -template<> struct EventName { static constexpr const char *const name = "OnChanDrop"; }; diff --git a/include/modules/cs_entrymsg.h b/include/modules/cs_entrymsg.h deleted file mode 100644 index b5804068f..000000000 --- a/include/modules/cs_entrymsg.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * (C) 2003-2014 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for further details. - * - */ - -class EntryMsg : public Serialize::Object -{ - protected: - using Serialize::Object::Object; - - public: - virtual ChanServ::Channel *GetChannel() anope_abstract; - virtual void SetChannel(ChanServ::Channel *) anope_abstract; - - virtual Anope::string GetCreator() anope_abstract; - virtual void SetCreator(const Anope::string &) anope_abstract; - - virtual Anope::string GetMessage() anope_abstract; - virtual void SetMessage(const Anope::string &) anope_abstract; - - virtual time_t GetWhen() anope_abstract; - virtual void SetWhen(const time_t &) anope_abstract; -}; - -static Serialize::TypeReference entrymsg("EntryMsg"); - diff --git a/include/modules/cs_info.h b/include/modules/cs_info.h deleted file mode 100644 index f80e3daf2..000000000 --- a/include/modules/cs_info.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * - * (C) 2014 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for further details. - * - */ - -namespace Event -{ - struct CoreExport ChanInfo : Events - { - /** Called when a user requests info for a channel - * @param source The user requesting info - * @param ci The channel the user is requesting info for - * @param info Data to show the user requesting information - * @param show_hidden true if we should show the user everything - */ - virtual void OnChanInfo(CommandSource &source, ChanServ::Channel *ci, InfoFormatter &info, bool show_hidden) anope_abstract; - }; -} - -template<> struct EventName { static constexpr const char *const name = "OnChanInfo"; }; diff --git a/include/modules/cs_log.h b/include/modules/cs_log.h deleted file mode 100644 index d940f5e87..000000000 --- a/include/modules/cs_log.h +++ /dev/null @@ -1,44 +0,0 @@ -/* ChanServ core functions - * - * (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. - */ - -class LogSetting : public Serialize::Object -{ - protected: - using Serialize::Object::Object; - - public: - virtual ChanServ::Channel *GetChannel() anope_abstract; - virtual void SetChannel(ChanServ::Channel *) anope_abstract; - - virtual Anope::string GetServiceName() anope_abstract; - virtual void SetServiceName(const Anope::string &) anope_abstract; - - virtual Anope::string GetCommandService() anope_abstract; - virtual void SetCommandService(const Anope::string &) anope_abstract; - - virtual Anope::string GetCommandName() anope_abstract; - virtual void SetCommandName(const Anope::string &) anope_abstract; - - virtual Anope::string GetMethod() anope_abstract; - virtual void SetMethod(const Anope::string &) anope_abstract; - - virtual Anope::string GetExtra() anope_abstract; - virtual void SetExtra(const Anope::string &) anope_abstract; - - virtual Anope::string GetCreator() anope_abstract; - virtual void SetCreator(const Anope::string &) anope_abstract; - - virtual time_t GetCreated() anope_abstract; - virtual void SetCreated(const time_t &) anope_abstract; -}; - -static Serialize::TypeReference logsetting("LogSetting"); - diff --git a/include/modules/cs_mode.h b/include/modules/cs_mode.h deleted file mode 100644 index 4c7965e2a..000000000 --- a/include/modules/cs_mode.h +++ /dev/null @@ -1,123 +0,0 @@ -/* ChanServ core functions - * - * (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. - */ - -class ModeLock : public Serialize::Object -{ - protected: - using Serialize::Object::Object; - - public: - virtual ChanServ::Channel *GetChannel() anope_abstract; - virtual void SetChannel(ChanServ::Channel *) anope_abstract; - - virtual bool GetSet() anope_abstract; - virtual void SetSet(const bool &) anope_abstract; - - virtual Anope::string GetName() anope_abstract; - virtual void SetName(const Anope::string &) anope_abstract; - - virtual Anope::string GetParam() anope_abstract; - virtual void SetParam(const Anope::string &) anope_abstract; - - virtual Anope::string GetSetter() anope_abstract; - virtual void SetSetter(const Anope::string &) anope_abstract; - - virtual time_t GetCreated() anope_abstract; - virtual void SetCreated(const time_t &) anope_abstract; -}; - -static Serialize::TypeReference modelock("ModeLock"); - -class ModeLocks : public Service -{ - public: - ModeLocks(Module *me) : Service(me, "ModeLocks", "mlocks") { } - - typedef std::vector ModeList; - - /** Check if a mode is mlocked - * @param mode The mode - * @param An optional param - * @param status True to check mlock on, false for mlock off - * @return true on success, false on fail - */ - virtual bool HasMLock(ChanServ::Channel *, ChannelMode *mode, const Anope::string ¶m, bool status) const anope_abstract; - - /** Set a mlock - * @param mode The mode - * @param status True for mlock on, false for mlock off - * @param param An optional param arg for + mlocked modes - * @param setter Who is setting the mlock - * @param created When the mlock was created - * @return true on success, false on failure (module blocking) - */ - virtual bool SetMLock(ChanServ::Channel *, ChannelMode *mode, bool status, const Anope::string ¶m = "", Anope::string setter = "", time_t created = Anope::CurTime) anope_abstract; - - /** Remove a mlock - * @param mode The mode - * @param status True for mlock on, false for mlock off - * @param param The param of the mode, required if it is a list or status mode - * @return true on success, false on failure - */ - virtual bool RemoveMLock(ChanServ::Channel *, ChannelMode *mode, bool status, const Anope::string ¶m = "") anope_abstract; - - /** Clear all mlocks on the channel - */ - virtual void ClearMLock(ChanServ::Channel *) anope_abstract; - - /** Get all of the mlocks for this channel - * @return The mlocks - */ - virtual ModeList GetMLock(ChanServ::Channel *) const anope_abstract; - - /** Get a list of mode locks on a channel - * @param name The mode name to get a list of - * @return a list of mlocks for the given mode - */ - virtual std::list GetModeLockList(ChanServ::Channel *, const Anope::string &name) anope_abstract; - - /** Get details for a specific mlock - * @param mname The mode name - * @param An optional param to match with - * @return The MLock, if any - */ - virtual ModeLock *GetMLock(ChanServ::Channel *, const Anope::string &mname, const Anope::string ¶m = "") anope_abstract; - - /** Get the current mode locks as a string - * @param complete True to show mlock parameters as well - * @return A string of mode locks, eg: +nrt - */ - virtual Anope::string GetMLockAsString(ChanServ::Channel *, bool complete) const anope_abstract; -}; - -static ServiceReference mlocks("ModeLocks", "mlocks"); - -namespace Event -{ - struct CoreExport MLockEvents : Events - { - /** Called when a mode is about to be mlocked - * @param ci The channel the mode is being locked on - * @param lock The mode lock - * @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to deny the mlock. - */ - virtual EventReturn OnMLock(ChanServ::Channel *ci, ModeLock *lock) anope_abstract; - - /** Called when a mode is about to be unlocked - * @param ci The channel the mode is being unlocked from - * @param lock The mode lock - * @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to deny the mlock. - */ - virtual EventReturn OnUnMLock(ChanServ::Channel *ci, ModeLock *lock) anope_abstract; - }; -} - -template<> struct EventName { static constexpr const char *const name = "MLock"; }; diff --git a/include/modules/cs_set.h b/include/modules/cs_set.h deleted file mode 100644 index a0e81c888..000000000 --- a/include/modules/cs_set.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * - * (C) 2014 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for further details. - * - */ - -namespace Event -{ - struct CoreExport SetChannelOption : Events - { - /** Called when a chanserv/set command is used - * @param source The source of the command - * @param cmd The command - * @param ci The channel the command was used on - * @param setting The setting passed to the command. Probably ON/OFF. - * @return EVENT_ALLOW to bypass access checks, EVENT_STOP to halt immediately. - */ - virtual EventReturn OnSetChannelOption(CommandSource &source, Command *cmd, ChanServ::Channel *ci, const Anope::string &setting) anope_abstract; - }; - static EventHandlersReference OnSetChannelOption; -} - -template<> struct EventName { static constexpr const char *const name = "OnSetChannelOption"; }; diff --git a/include/modules/cs_set_misc.h b/include/modules/cs_set_misc.h deleted file mode 100644 index 65b92cc89..000000000 --- a/include/modules/cs_set_misc.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * (C) 2014 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for further details. - */ - -class CSMiscData : public Serialize::Object -{ - protected: - using Serialize::Object::Object; - - public: - virtual ChanServ::Channel *GetChannel() anope_abstract; - virtual void SetChannel(ChanServ::Channel *) anope_abstract; - - virtual Anope::string GetName() anope_abstract; - virtual void SetName(const Anope::string &) anope_abstract; - - virtual Anope::string GetData() anope_abstract; - virtual void SetData(const Anope::string &) anope_abstract; -}; - -static Serialize::TypeReference csmiscdata("CSMiscData"); - diff --git a/include/modules/cs_suspend.h b/include/modules/cs_suspend.h deleted file mode 100644 index 27187ea09..000000000 --- a/include/modules/cs_suspend.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * (C) 2014 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for further details. - * - */ - -class CSSuspendInfo : public Serialize::Object -{ - protected: - using Serialize::Object::Object; - - public: - virtual ChanServ::Channel *GetChannel() anope_abstract; - virtual void SetChannel(ChanServ::Channel *) anope_abstract; - - virtual Anope::string GetBy() anope_abstract; - virtual void SetBy(const Anope::string &) anope_abstract; - - virtual Anope::string GetReason() anope_abstract; - virtual void SetReason(const Anope::string &) anope_abstract; - - virtual time_t GetWhen() anope_abstract; - virtual void SetWhen(const time_t &) anope_abstract; - - virtual time_t GetExpires() anope_abstract; - virtual void SetExpires(const time_t &) anope_abstract; -}; - -static Serialize::TypeReference cssuspendinfo("CSSuspendInfo"); - -namespace Event -{ - struct CoreExport ChanSuspend : Events - { - /** Called when a channel is suspended - * @param ci The channel - */ - virtual void OnChanSuspend(ChanServ::Channel *ci) anope_abstract; - }; - struct CoreExport ChanUnsuspend : Events - { - /** Called when a channel is unsuspended - * @param ci The channel - */ - virtual void OnChanUnsuspend(ChanServ::Channel *ci) anope_abstract; - }; - extern CoreExport EventHandlers OnChanUnsuspend; -} - -template<> struct EventName { static constexpr const char *const name = "OnChanSuspend"; }; -template<> struct EventName { static constexpr const char *const name = "OnChanUnsuspend"; }; diff --git a/include/modules/hostserv/del.h b/include/modules/hostserv/del.h new file mode 100644 index 000000000..9b2ea39ef --- /dev/null +++ b/include/modules/hostserv/del.h @@ -0,0 +1,20 @@ +/* + * + * (C) 2003-2014 Anope Team + * Contact us at team@anope.org + * + * Please read COPYING and README for further details. + */ + +namespace Event +{ + struct CoreExport DeleteVhost : Events + { + /** Called when a vhost is deleted + * @param na The nickalias of the vhost + */ + virtual void OnDeleteVhost(NickServ::Nick *na) anope_abstract; + }; +} + +template<> struct EventName { static constexpr const char *const name = "OnDeleteVhost"; }; diff --git a/include/modules/hs_del.h b/include/modules/hs_del.h deleted file mode 100644 index 9b2ea39ef..000000000 --- a/include/modules/hs_del.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * - * (C) 2003-2014 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for further details. - */ - -namespace Event -{ - struct CoreExport DeleteVhost : Events - { - /** Called when a vhost is deleted - * @param na The nickalias of the vhost - */ - virtual void OnDeleteVhost(NickServ::Nick *na) anope_abstract; - }; -} - -template<> struct EventName { static constexpr const char *const name = "OnDeleteVhost"; }; diff --git a/include/modules/nickserv/access.h b/include/modules/nickserv/access.h new file mode 100644 index 000000000..73a625f3d --- /dev/null +++ b/include/modules/nickserv/access.h @@ -0,0 +1,22 @@ +/* + * + * (C) 2003-2014 Anope Team + * Contact us at team@anope.org + * + * Please read COPYING and README for further details. + */ + +class NickAccess : public Serialize::Object +{ + public: + using Serialize::Object::Object; + + virtual NickServ::Account *GetAccount() anope_abstract; + virtual void SetAccount(NickServ::Account *) anope_abstract; + + virtual Anope::string GetMask() anope_abstract; + virtual void SetMask(const Anope::string &) anope_abstract; +}; + +static Serialize::TypeReference nsaccess("NSAccess"); + diff --git a/include/modules/nickserv/ajoin.h b/include/modules/nickserv/ajoin.h new file mode 100644 index 000000000..7b4cc20e5 --- /dev/null +++ b/include/modules/nickserv/ajoin.h @@ -0,0 +1,25 @@ +/* + * + * (C) 2013-2014 Anope Team + * Contact us at team@anope.org + * + * Please read COPYING and README for further details. + */ + +class AutoJoin : public Serialize::Object +{ + protected: + using Serialize::Object::Object; + + public: + virtual NickServ::Account *GetOwner() anope_abstract; + virtual void SetOwner(NickServ::Account *acc) anope_abstract; + + virtual Anope::string GetChannel() anope_abstract; + virtual void SetChannel(const Anope::string &c) anope_abstract; + + virtual Anope::string GetKey() anope_abstract; + virtual void SetKey(const Anope::string &k) anope_abstract; +}; + +static Serialize::TypeReference autojoin("AutoJoin"); diff --git a/include/modules/nickserv/cert.h b/include/modules/nickserv/cert.h new file mode 100644 index 000000000..be75fb9bf --- /dev/null +++ b/include/modules/nickserv/cert.h @@ -0,0 +1,66 @@ +/* NickServ core functions + * + * (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. + */ + +class NSCertEntry; + +class CertService : public Service +{ + public: + CertService(Module *c) : Service(c, "CertService", "certs") { } + + virtual NickServ::Account* FindAccountFromCert(const Anope::string &cert) anope_abstract; + + virtual bool Matches(User *, NickServ::Account *) anope_abstract; + + virtual NSCertEntry *FindCert(const std::vector &cl, const Anope::string &certfp) anope_abstract; +}; + +static ServiceReference certservice("CertService", "certs"); + +class NSCertEntry : public Serialize::Object +{ + public: + using Serialize::Object::Object; + + virtual NickServ::Account *GetAccount() anope_abstract; + virtual void SetAccount(NickServ::Account *) anope_abstract; + + virtual Anope::string GetCert() anope_abstract; + virtual void SetCert(const Anope::string &) anope_abstract; +}; + +static Serialize::TypeReference certentry("NSCertEntry"); + +namespace Event +{ + struct CoreExport NickCertEvents : Events + { + /** Called when a user adds an entry to their cert list + * @param nc The nick + * @param entry The entry + */ + virtual void OnNickAddCert(NickServ::Account *nc, const Anope::string &entry) anope_abstract; + + /** Called from NickServ::Account::EraseCert() + * @param nc pointer to the NickServ::Account + * @param entry The fingerprint + */ + virtual void OnNickEraseCert(NickServ::Account *nc, const Anope::string &entry) anope_abstract; + + /** called from NickServ::Account::ClearCert() + * @param nc pointer to the NickServ::Account + */ + virtual void OnNickClearCert(NickServ::Account *nc) anope_abstract; + }; +} + + +template<> struct EventName { static constexpr const char *const name = "OnNickCert"; }; diff --git a/include/modules/nickserv/drop.h b/include/modules/nickserv/drop.h new file mode 100644 index 000000000..bae9d77b6 --- /dev/null +++ b/include/modules/nickserv/drop.h @@ -0,0 +1,22 @@ +/* + * + * (C) 2003-2014 Anope Team + * Contact us at team@anope.org + * + * Please read COPYING and README for further details. + */ + +namespace Event +{ + struct CoreExport NickDrop : Events + { + /** Called when a nick is dropped + * @param source The source of the command + * @param na The nick + */ + virtual void OnNickDrop(CommandSource &source, NickServ::Nick *na) anope_abstract; + }; + extern CoreExport EventHandlers OnNickDrop; +} + +template<> struct EventName { static constexpr const char *const name = "OnNickDrop"; }; diff --git a/include/modules/nickserv/group.h b/include/modules/nickserv/group.h new file mode 100644 index 000000000..caa568a9e --- /dev/null +++ b/include/modules/nickserv/group.h @@ -0,0 +1,22 @@ +/* + * + * (C) 2003-2014 Anope Team + * Contact us at team@anope.org + * + * Please read COPYING and README for further details. + * + */ + +namespace Event +{ + struct CoreExport NickGroup : Events + { + /** Called when a user groups their nick + * @param u The user grouping + * @param target The target they're grouping to + */ + virtual void OnNickGroup(User *u, NickServ::Nick *target) anope_abstract; + }; +} + +template<> struct EventName { static constexpr const char *const name = "OnNickGroup"; }; diff --git a/include/modules/nickserv/info.h b/include/modules/nickserv/info.h new file mode 100644 index 000000000..e816cc356 --- /dev/null +++ b/include/modules/nickserv/info.h @@ -0,0 +1,24 @@ +/* + * + * (C) 2003-2014 Anope Team + * Contact us at team@anope.org + * + * Please read COPYING and README for further details. + * + */ + +namespace Event +{ + struct CoreExport NickInfo : Events + { + /** Called when a user requests info for a nick + * @param source The user requesting info + * @param na The nick the user is requesting info from + * @param info Data to show the user requesting information + * @param show_hidden true if we should show the user everything + */ + virtual void OnNickInfo(CommandSource &source, NickServ::Nick *na, InfoFormatter &info, bool show_hidden) anope_abstract; + }; +} + +template<> struct EventName { static constexpr const char *const name = "OnNickInfo"; }; diff --git a/include/modules/nickserv/set.h b/include/modules/nickserv/set.h new file mode 100644 index 000000000..c6b86032b --- /dev/null +++ b/include/modules/nickserv/set.h @@ -0,0 +1,26 @@ +/* + * + * (C) 2014 Anope Team + * Contact us at team@anope.org + * + * Please read COPYING and README for further details. + * + */ + +namespace Event +{ + struct CoreExport SetNickOption : Events + { + /** Called when a nickserv/set command is used. + * @param source The source of the command + * @param cmd The command + * @param nc The nickcore being modifed + * @param setting The setting passed to the command. Probably ON/OFF. + * @return EVENT_STOP to halt immediately + */ + virtual EventReturn OnSetNickOption(CommandSource &source, Command *cmd, NickServ::Account *nc, const Anope::string &setting) anope_abstract; + }; + static EventHandlersReference OnSetNickOption; +} + +template<> struct EventName { static constexpr const char *const name = "OnSetNickOption"; }; diff --git a/include/modules/nickserv/set_misc.h b/include/modules/nickserv/set_misc.h new file mode 100644 index 000000000..18d49dd0f --- /dev/null +++ b/include/modules/nickserv/set_misc.h @@ -0,0 +1,25 @@ +/* + * (C) 2014 Anope Team + * Contact us at team@anope.org + * + * Please read COPYING and README for further details. + */ + +class NSMiscData : public Serialize::Object +{ + protected: + using Serialize::Object::Object; + + public: + virtual NickServ::Account *GetAccount() anope_abstract; + virtual void SetAccount(NickServ::Account *) anope_abstract; + + virtual Anope::string GetName() anope_abstract; + virtual void SetName(const Anope::string &) anope_abstract; + + virtual Anope::string GetData() anope_abstract; + virtual void SetData(const Anope::string &) anope_abstract; +}; + +static Serialize::TypeReference nsmiscdata("NSMiscData"); + diff --git a/include/modules/nickserv/suspend.h b/include/modules/nickserv/suspend.h new file mode 100644 index 000000000..fcfc0265d --- /dev/null +++ b/include/modules/nickserv/suspend.h @@ -0,0 +1,53 @@ +/* + * (C) 2014 Anope Team + * Contact us at team@anope.org + * + * Please read COPYING and README for further details. + * + */ + +class NSSuspendInfo : public Serialize::Object +{ + protected: + using Serialize::Object::Object; + + public: + virtual NickServ::Account *GetAccount() anope_abstract; + virtual void SetAccount(NickServ::Account *) anope_abstract; + + virtual Anope::string GetBy() anope_abstract; + virtual void SetBy(const Anope::string &) anope_abstract; + + virtual Anope::string GetReason() anope_abstract; + virtual void SetReason(const Anope::string &) anope_abstract; + + virtual time_t GetWhen() anope_abstract; + virtual void SetWhen(const time_t &) anope_abstract; + + virtual time_t GetExpires() anope_abstract; + virtual void SetExpires(const time_t &) anope_abstract; +}; + +static Serialize::TypeReference nssuspendinfo("NSSuspendInfo"); + +namespace Event +{ + struct CoreExport NickSuspend : Events + { + /** Called when a nick is suspended + * @param na The nick alias + */ + virtual void OnNickSuspend(NickServ::Nick *na) anope_abstract; + }; + + struct CoreExport NickUnsuspend : Events + { + /** Called when a nick is unsuspneded + * @param na The nick alias + */ + virtual void OnNickUnsuspend(NickServ::Nick *na) anope_abstract; + }; +} + +template<> struct EventName { static constexpr const char *const name = "OnNickSuspend"; }; +template<> struct EventName { static constexpr const char *const name = "OnNickUnsuspend"; }; diff --git a/include/modules/nickserv/update.h b/include/modules/nickserv/update.h new file mode 100644 index 000000000..ce75c33ac --- /dev/null +++ b/include/modules/nickserv/update.h @@ -0,0 +1,21 @@ +/* + * + * (C) 2014 Anope Team + * Contact us at team@anope.org + * + * Please read COPYING and README for further details. + * + */ + +namespace Event +{ + struct CoreExport NickUpdate : Events + { + /** Called when a user does /ns update + * @param u The user + */ + virtual void OnNickUpdate(User *u) anope_abstract; + }; +} + +template<> struct EventName { static constexpr const char *const name = "OnNickUpdate"; }; diff --git a/include/modules/ns_access.h b/include/modules/ns_access.h deleted file mode 100644 index 73a625f3d..000000000 --- a/include/modules/ns_access.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * - * (C) 2003-2014 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for further details. - */ - -class NickAccess : public Serialize::Object -{ - public: - using Serialize::Object::Object; - - virtual NickServ::Account *GetAccount() anope_abstract; - virtual void SetAccount(NickServ::Account *) anope_abstract; - - virtual Anope::string GetMask() anope_abstract; - virtual void SetMask(const Anope::string &) anope_abstract; -}; - -static Serialize::TypeReference nsaccess("NSAccess"); - diff --git a/include/modules/ns_ajoin.h b/include/modules/ns_ajoin.h deleted file mode 100644 index 7b4cc20e5..000000000 --- a/include/modules/ns_ajoin.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * - * (C) 2013-2014 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for further details. - */ - -class AutoJoin : public Serialize::Object -{ - protected: - using Serialize::Object::Object; - - public: - virtual NickServ::Account *GetOwner() anope_abstract; - virtual void SetOwner(NickServ::Account *acc) anope_abstract; - - virtual Anope::string GetChannel() anope_abstract; - virtual void SetChannel(const Anope::string &c) anope_abstract; - - virtual Anope::string GetKey() anope_abstract; - virtual void SetKey(const Anope::string &k) anope_abstract; -}; - -static Serialize::TypeReference autojoin("AutoJoin"); diff --git a/include/modules/ns_cert.h b/include/modules/ns_cert.h deleted file mode 100644 index be75fb9bf..000000000 --- a/include/modules/ns_cert.h +++ /dev/null @@ -1,66 +0,0 @@ -/* NickServ core functions - * - * (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. - */ - -class NSCertEntry; - -class CertService : public Service -{ - public: - CertService(Module *c) : Service(c, "CertService", "certs") { } - - virtual NickServ::Account* FindAccountFromCert(const Anope::string &cert) anope_abstract; - - virtual bool Matches(User *, NickServ::Account *) anope_abstract; - - virtual NSCertEntry *FindCert(const std::vector &cl, const Anope::string &certfp) anope_abstract; -}; - -static ServiceReference certservice("CertService", "certs"); - -class NSCertEntry : public Serialize::Object -{ - public: - using Serialize::Object::Object; - - virtual NickServ::Account *GetAccount() anope_abstract; - virtual void SetAccount(NickServ::Account *) anope_abstract; - - virtual Anope::string GetCert() anope_abstract; - virtual void SetCert(const Anope::string &) anope_abstract; -}; - -static Serialize::TypeReference certentry("NSCertEntry"); - -namespace Event -{ - struct CoreExport NickCertEvents : Events - { - /** Called when a user adds an entry to their cert list - * @param nc The nick - * @param entry The entry - */ - virtual void OnNickAddCert(NickServ::Account *nc, const Anope::string &entry) anope_abstract; - - /** Called from NickServ::Account::EraseCert() - * @param nc pointer to the NickServ::Account - * @param entry The fingerprint - */ - virtual void OnNickEraseCert(NickServ::Account *nc, const Anope::string &entry) anope_abstract; - - /** called from NickServ::Account::ClearCert() - * @param nc pointer to the NickServ::Account - */ - virtual void OnNickClearCert(NickServ::Account *nc) anope_abstract; - }; -} - - -template<> struct EventName { static constexpr const char *const name = "OnNickCert"; }; diff --git a/include/modules/ns_drop.h b/include/modules/ns_drop.h deleted file mode 100644 index bae9d77b6..000000000 --- a/include/modules/ns_drop.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * - * (C) 2003-2014 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for further details. - */ - -namespace Event -{ - struct CoreExport NickDrop : Events - { - /** Called when a nick is dropped - * @param source The source of the command - * @param na The nick - */ - virtual void OnNickDrop(CommandSource &source, NickServ::Nick *na) anope_abstract; - }; - extern CoreExport EventHandlers OnNickDrop; -} - -template<> struct EventName { static constexpr const char *const name = "OnNickDrop"; }; diff --git a/include/modules/ns_group.h b/include/modules/ns_group.h deleted file mode 100644 index caa568a9e..000000000 --- a/include/modules/ns_group.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * - * (C) 2003-2014 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for further details. - * - */ - -namespace Event -{ - struct CoreExport NickGroup : Events - { - /** Called when a user groups their nick - * @param u The user grouping - * @param target The target they're grouping to - */ - virtual void OnNickGroup(User *u, NickServ::Nick *target) anope_abstract; - }; -} - -template<> struct EventName { static constexpr const char *const name = "OnNickGroup"; }; diff --git a/include/modules/ns_info.h b/include/modules/ns_info.h deleted file mode 100644 index e816cc356..000000000 --- a/include/modules/ns_info.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * - * (C) 2003-2014 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for further details. - * - */ - -namespace Event -{ - struct CoreExport NickInfo : Events - { - /** Called when a user requests info for a nick - * @param source The user requesting info - * @param na The nick the user is requesting info from - * @param info Data to show the user requesting information - * @param show_hidden true if we should show the user everything - */ - virtual void OnNickInfo(CommandSource &source, NickServ::Nick *na, InfoFormatter &info, bool show_hidden) anope_abstract; - }; -} - -template<> struct EventName { static constexpr const char *const name = "OnNickInfo"; }; diff --git a/include/modules/ns_set.h b/include/modules/ns_set.h deleted file mode 100644 index c6b86032b..000000000 --- a/include/modules/ns_set.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * - * (C) 2014 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for further details. - * - */ - -namespace Event -{ - struct CoreExport SetNickOption : Events - { - /** Called when a nickserv/set command is used. - * @param source The source of the command - * @param cmd The command - * @param nc The nickcore being modifed - * @param setting The setting passed to the command. Probably ON/OFF. - * @return EVENT_STOP to halt immediately - */ - virtual EventReturn OnSetNickOption(CommandSource &source, Command *cmd, NickServ::Account *nc, const Anope::string &setting) anope_abstract; - }; - static EventHandlersReference OnSetNickOption; -} - -template<> struct EventName { static constexpr const char *const name = "OnSetNickOption"; }; diff --git a/include/modules/ns_set_misc.h b/include/modules/ns_set_misc.h deleted file mode 100644 index 18d49dd0f..000000000 --- a/include/modules/ns_set_misc.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * (C) 2014 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for further details. - */ - -class NSMiscData : public Serialize::Object -{ - protected: - using Serialize::Object::Object; - - public: - virtual NickServ::Account *GetAccount() anope_abstract; - virtual void SetAccount(NickServ::Account *) anope_abstract; - - virtual Anope::string GetName() anope_abstract; - virtual void SetName(const Anope::string &) anope_abstract; - - virtual Anope::string GetData() anope_abstract; - virtual void SetData(const Anope::string &) anope_abstract; -}; - -static Serialize::TypeReference nsmiscdata("NSMiscData"); - diff --git a/include/modules/ns_suspend.h b/include/modules/ns_suspend.h deleted file mode 100644 index fcfc0265d..000000000 --- a/include/modules/ns_suspend.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * (C) 2014 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for further details. - * - */ - -class NSSuspendInfo : public Serialize::Object -{ - protected: - using Serialize::Object::Object; - - public: - virtual NickServ::Account *GetAccount() anope_abstract; - virtual void SetAccount(NickServ::Account *) anope_abstract; - - virtual Anope::string GetBy() anope_abstract; - virtual void SetBy(const Anope::string &) anope_abstract; - - virtual Anope::string GetReason() anope_abstract; - virtual void SetReason(const Anope::string &) anope_abstract; - - virtual time_t GetWhen() anope_abstract; - virtual void SetWhen(const time_t &) anope_abstract; - - virtual time_t GetExpires() anope_abstract; - virtual void SetExpires(const time_t &) anope_abstract; -}; - -static Serialize::TypeReference nssuspendinfo("NSSuspendInfo"); - -namespace Event -{ - struct CoreExport NickSuspend : Events - { - /** Called when a nick is suspended - * @param na The nick alias - */ - virtual void OnNickSuspend(NickServ::Nick *na) anope_abstract; - }; - - struct CoreExport NickUnsuspend : Events - { - /** Called when a nick is unsuspneded - * @param na The nick alias - */ - virtual void OnNickUnsuspend(NickServ::Nick *na) anope_abstract; - }; -} - -template<> struct EventName { static constexpr const char *const name = "OnNickSuspend"; }; -template<> struct EventName { static constexpr const char *const name = "OnNickUnsuspend"; }; diff --git a/include/modules/ns_update.h b/include/modules/ns_update.h deleted file mode 100644 index ce75c33ac..000000000 --- a/include/modules/ns_update.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * - * (C) 2014 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for further details. - * - */ - -namespace Event -{ - struct CoreExport NickUpdate : Events - { - /** Called when a user does /ns update - * @param u The user - */ - virtual void OnNickUpdate(User *u) anope_abstract; - }; -} - -template<> struct EventName { static constexpr const char *const name = "OnNickUpdate"; }; diff --git a/include/modules/operserv/defcon.h b/include/modules/operserv/defcon.h new file mode 100644 index 000000000..f980d5008 --- /dev/null +++ b/include/modules/operserv/defcon.h @@ -0,0 +1,21 @@ +/* + * + * (C) 2014 Anope Team + * Contact us at team@anope.org + * + * Please read COPYING and README for further details. + * + */ + +namespace Event +{ + struct CoreExport DefconLevel : Events + { + /** Called when defcon level changes + * @param level The level + */ + virtual void OnDefconLevel(int level) anope_abstract; + }; +} + +template<> struct EventName { static constexpr const char *const name = "OnDefconLevel"; }; diff --git a/include/modules/operserv/dns.h b/include/modules/operserv/dns.h new file mode 100644 index 000000000..d76cd3d62 --- /dev/null +++ b/include/modules/operserv/dns.h @@ -0,0 +1,72 @@ +/* + * + * (C) 2014 Anope Team + * Contact us at team@anope.org + * + * Please read COPYING and README for further details. + */ + + +class DNSZone : public Serialize::Object +{ + protected: + using Serialize::Object::Object; + + public: + virtual Anope::string GetName() anope_abstract; + virtual void SetName(const Anope::string &) anope_abstract; +}; + +static Serialize::TypeReference dnszone("DNSZone"); + +class DNSServer : public Serialize::Object +{ + protected: + using Serialize::Object::Object; + + public: + virtual DNSZone *GetZone() anope_abstract; + virtual void SetZone(DNSZone *) anope_abstract; + + virtual Anope::string GetName() anope_abstract; + virtual void SetName(const Anope::string &) anope_abstract; + + virtual unsigned int GetLimit() anope_abstract; + virtual void SetLimit(const unsigned int &) anope_abstract; + + virtual bool GetPooled() anope_abstract; + virtual void SetPool(const bool &) anope_abstract; +}; + +static Serialize::TypeReference dnsserver("DNSServer"); + +class DNSZoneMembership : public Serialize::Object +{ + protected: + using Serialize::Object::Object; + + public: + virtual DNSServer *GetServer() anope_abstract; + virtual void SetServer(DNSServer *) anope_abstract; + + virtual DNSZone *GetZone() anope_abstract; + virtual void SetZone(DNSZone *) anope_abstract; +}; + +static Serialize::TypeReference dnszonemembership("DNSZoneMembership"); + +class DNSIP : public Serialize::Object +{ + protected: + using Serialize::Object::Object; + + public: + virtual DNSServer *GetServer() anope_abstract; + virtual void SetServer(DNSServer *) anope_abstract; + + virtual Anope::string GetIP() anope_abstract; + virtual void SetIP(const Anope::string &) anope_abstract; +}; + +static Serialize::TypeReference dnsip("DNSIP"); + diff --git a/include/modules/operserv/forbid.h b/include/modules/operserv/forbid.h new file mode 100644 index 000000000..9b21defec --- /dev/null +++ b/include/modules/operserv/forbid.h @@ -0,0 +1,56 @@ +/* + * + * (C) 2013-2014 Anope Team + * Contact us at team@anope.org + * + * Please read COPYING and README for further details. + */ + +enum ForbidType +{ + FT_NICK = 1, + FT_CHAN, + FT_EMAIL, + FT_REGISTER, + FT_SIZE +}; + +class ForbidData : public Serialize::Object +{ + protected: + using Serialize::Object::Object; + + public: + virtual Anope::string GetMask() anope_abstract; + virtual void SetMask(const Anope::string &) anope_abstract; + + virtual Anope::string GetCreator() anope_abstract; + virtual void SetCreator(const Anope::string &) anope_abstract; + + virtual Anope::string GetReason() anope_abstract; + virtual void SetReason(const Anope::string &) anope_abstract; + + virtual time_t GetCreated() anope_abstract; + virtual void SetCreated(const time_t &) anope_abstract; + + virtual time_t GetExpires() anope_abstract; + virtual void SetExpires(const time_t &) anope_abstract; + + virtual ForbidType GetType() anope_abstract; + virtual void SetType(const ForbidType &) anope_abstract; +}; + +class ForbidService : public Service +{ + public: + ForbidService(Module *m) : Service(m, "ForbidService", "forbid") { } + + virtual ForbidData *FindForbid(const Anope::string &mask, ForbidType type) anope_abstract; + + virtual std::vector GetForbids() anope_abstract; +}; + +static ServiceReference forbid_service("ForbidService", "forbid"); + +static Serialize::TypeReference forbiddata("ForbidData"); + diff --git a/include/modules/operserv/ignore.h b/include/modules/operserv/ignore.h new file mode 100644 index 000000000..2326b5575 --- /dev/null +++ b/include/modules/operserv/ignore.h @@ -0,0 +1,43 @@ +/* OperServ ignore interface + * + * (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. + */ + + +class Ignore : public Serialize::Object +{ + public: + using Serialize::Object::Object; + + virtual Anope::string GetMask() anope_abstract; + virtual void SetMask(const Anope::string &) anope_abstract; + + virtual Anope::string GetCreator() anope_abstract; + virtual void SetCreator(const Anope::string &) anope_abstract; + + virtual Anope::string GetReason() anope_abstract; + virtual void SetReason(const Anope::string &) anope_abstract; + + virtual time_t GetTime() anope_abstract; + virtual void SetTime(const time_t &) anope_abstract; +}; + +static Serialize::TypeReference ignoretype("IgnoreData"); + +class IgnoreService : public Service +{ + protected: + IgnoreService(Module *c) : Service(c, "IgnoreService", "ignore") { } + + public: + virtual Ignore *Find(const Anope::string &mask) anope_abstract; +}; + +static ServiceReference ignore_service("IgnoreService", "ignore"); + diff --git a/include/modules/operserv/info.h b/include/modules/operserv/info.h new file mode 100644 index 000000000..6e819158d --- /dev/null +++ b/include/modules/operserv/info.h @@ -0,0 +1,29 @@ +/* + * + * (C) 2014 Anope Team + * Contact us at team@anope.org + * + * Please read COPYING and README for further details. + */ + +class OperInfo : public Serialize::Object +{ + protected: + using Serialize::Object::Object; + + public: + virtual Serialize::Object *GetTarget() anope_abstract; + virtual void SetTarget(Serialize::Object *) anope_abstract; + + virtual Anope::string GetInfo() anope_abstract; + virtual void SetInfo(const Anope::string &) anope_abstract; + + virtual Anope::string GetCreator() anope_abstract; + virtual void SetCreator(const Anope::string &) anope_abstract; + + virtual time_t GetCreated() anope_abstract; + virtual void SetCreated(const time_t &) anope_abstract; +}; + +static Serialize::TypeReference operinfo("OperInfo"); + diff --git a/include/modules/operserv/news.h b/include/modules/operserv/news.h new file mode 100644 index 000000000..07627b1bc --- /dev/null +++ b/include/modules/operserv/news.h @@ -0,0 +1,32 @@ +#ifndef OS_NEWS +#define OS_NEWS + +enum NewsType +{ + NEWS_LOGON, + NEWS_RANDOM, + NEWS_OPER +}; + +class NewsItem : public Serialize::Object +{ + public: + using Serialize::Object::Object; + + virtual NewsType GetNewsType() anope_abstract; + virtual void SetNewsType(const NewsType &) anope_abstract; + + virtual Anope::string GetText() anope_abstract; + virtual void SetText(const Anope::string &) anope_abstract; + + virtual Anope::string GetWho() anope_abstract; + virtual void SetWho(const Anope::string &) anope_abstract; + + virtual time_t GetTime() anope_abstract; + virtual void SetTime(const time_t &) anope_abstract; +}; + +static Serialize::TypeReference newsitem("NewsItem"); + +#endif // OS_NEWS + diff --git a/include/modules/operserv/session.h b/include/modules/operserv/session.h new file mode 100644 index 000000000..b9afd196e --- /dev/null +++ b/include/modules/operserv/session.h @@ -0,0 +1,77 @@ + +#pragma once + +struct Session +{ + cidr addr; /* A cidr (sockaddrs + len) representing this session */ + unsigned int count = 1; /* Number of clients with this host */ + unsigned int hits = 0; /* Number of subsequent kills for a host */ + + Session(const sockaddrs &ip, int len) : addr(ip, len) { } +}; + +class Exception : public Serialize::Object +{ + protected: + using Serialize::Object::Object; + + public: + + virtual Anope::string GetMask() anope_abstract; + virtual void SetMask(const Anope::string &) anope_abstract; + + virtual unsigned int GetLimit() anope_abstract; + virtual void SetLimit(unsigned int) anope_abstract; + + virtual Anope::string GetWho() anope_abstract; + virtual void SetWho(const Anope::string &) anope_abstract; + + virtual Anope::string GetReason() anope_abstract; + virtual void SetReason(const Anope::string &) anope_abstract; + + virtual time_t GetTime() anope_abstract; + virtual void SetTime(const time_t &) anope_abstract; + + virtual time_t GetExpires() anope_abstract; + virtual void SetExpires(const time_t &) anope_abstract; +}; + +static Serialize::TypeReference exception("Exception"); + +class SessionService : public Service +{ + public: + typedef std::unordered_map SessionMap; + + SessionService(Module *m) : Service(m, "SessionService", "session") { } + + virtual Exception *FindException(User *u) anope_abstract; + + virtual Exception *FindException(const Anope::string &host) anope_abstract; + + virtual Session *FindSession(const Anope::string &ip) anope_abstract; + + virtual SessionMap &GetSessions() anope_abstract; +}; + +static ServiceReference session_service("SessionService", "session"); + +namespace Event +{ + struct CoreExport Exception : Events + { + /** Called after an exception has been added + * @param ex The exception + * @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it + */ + virtual EventReturn OnExceptionAdd(::Exception *ex) anope_abstract; + + /** Called before an exception is deleted + * @param source The source deleting it + * @param ex The exceotion + */ + virtual void OnExceptionDel(CommandSource &source, ::Exception *ex) anope_abstract; + }; +} + +template<> struct EventName { static constexpr const char *const name = "Exception"; }; diff --git a/include/modules/os_defcon.h b/include/modules/os_defcon.h deleted file mode 100644 index f980d5008..000000000 --- a/include/modules/os_defcon.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * - * (C) 2014 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for further details. - * - */ - -namespace Event -{ - struct CoreExport DefconLevel : Events - { - /** Called when defcon level changes - * @param level The level - */ - virtual void OnDefconLevel(int level) anope_abstract; - }; -} - -template<> struct EventName { static constexpr const char *const name = "OnDefconLevel"; }; diff --git a/include/modules/os_dns.h b/include/modules/os_dns.h deleted file mode 100644 index d76cd3d62..000000000 --- a/include/modules/os_dns.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * - * (C) 2014 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for further details. - */ - - -class DNSZone : public Serialize::Object -{ - protected: - using Serialize::Object::Object; - - public: - virtual Anope::string GetName() anope_abstract; - virtual void SetName(const Anope::string &) anope_abstract; -}; - -static Serialize::TypeReference dnszone("DNSZone"); - -class DNSServer : public Serialize::Object -{ - protected: - using Serialize::Object::Object; - - public: - virtual DNSZone *GetZone() anope_abstract; - virtual void SetZone(DNSZone *) anope_abstract; - - virtual Anope::string GetName() anope_abstract; - virtual void SetName(const Anope::string &) anope_abstract; - - virtual unsigned int GetLimit() anope_abstract; - virtual void SetLimit(const unsigned int &) anope_abstract; - - virtual bool GetPooled() anope_abstract; - virtual void SetPool(const bool &) anope_abstract; -}; - -static Serialize::TypeReference dnsserver("DNSServer"); - -class DNSZoneMembership : public Serialize::Object -{ - protected: - using Serialize::Object::Object; - - public: - virtual DNSServer *GetServer() anope_abstract; - virtual void SetServer(DNSServer *) anope_abstract; - - virtual DNSZone *GetZone() anope_abstract; - virtual void SetZone(DNSZone *) anope_abstract; -}; - -static Serialize::TypeReference dnszonemembership("DNSZoneMembership"); - -class DNSIP : public Serialize::Object -{ - protected: - using Serialize::Object::Object; - - public: - virtual DNSServer *GetServer() anope_abstract; - virtual void SetServer(DNSServer *) anope_abstract; - - virtual Anope::string GetIP() anope_abstract; - virtual void SetIP(const Anope::string &) anope_abstract; -}; - -static Serialize::TypeReference dnsip("DNSIP"); - diff --git a/include/modules/os_forbid.h b/include/modules/os_forbid.h deleted file mode 100644 index 9b21defec..000000000 --- a/include/modules/os_forbid.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * - * (C) 2013-2014 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for further details. - */ - -enum ForbidType -{ - FT_NICK = 1, - FT_CHAN, - FT_EMAIL, - FT_REGISTER, - FT_SIZE -}; - -class ForbidData : public Serialize::Object -{ - protected: - using Serialize::Object::Object; - - public: - virtual Anope::string GetMask() anope_abstract; - virtual void SetMask(const Anope::string &) anope_abstract; - - virtual Anope::string GetCreator() anope_abstract; - virtual void SetCreator(const Anope::string &) anope_abstract; - - virtual Anope::string GetReason() anope_abstract; - virtual void SetReason(const Anope::string &) anope_abstract; - - virtual time_t GetCreated() anope_abstract; - virtual void SetCreated(const time_t &) anope_abstract; - - virtual time_t GetExpires() anope_abstract; - virtual void SetExpires(const time_t &) anope_abstract; - - virtual ForbidType GetType() anope_abstract; - virtual void SetType(const ForbidType &) anope_abstract; -}; - -class ForbidService : public Service -{ - public: - ForbidService(Module *m) : Service(m, "ForbidService", "forbid") { } - - virtual ForbidData *FindForbid(const Anope::string &mask, ForbidType type) anope_abstract; - - virtual std::vector GetForbids() anope_abstract; -}; - -static ServiceReference forbid_service("ForbidService", "forbid"); - -static Serialize::TypeReference forbiddata("ForbidData"); - diff --git a/include/modules/os_ignore.h b/include/modules/os_ignore.h deleted file mode 100644 index 2326b5575..000000000 --- a/include/modules/os_ignore.h +++ /dev/null @@ -1,43 +0,0 @@ -/* OperServ ignore interface - * - * (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. - */ - - -class Ignore : public Serialize::Object -{ - public: - using Serialize::Object::Object; - - virtual Anope::string GetMask() anope_abstract; - virtual void SetMask(const Anope::string &) anope_abstract; - - virtual Anope::string GetCreator() anope_abstract; - virtual void SetCreator(const Anope::string &) anope_abstract; - - virtual Anope::string GetReason() anope_abstract; - virtual void SetReason(const Anope::string &) anope_abstract; - - virtual time_t GetTime() anope_abstract; - virtual void SetTime(const time_t &) anope_abstract; -}; - -static Serialize::TypeReference ignoretype("IgnoreData"); - -class IgnoreService : public Service -{ - protected: - IgnoreService(Module *c) : Service(c, "IgnoreService", "ignore") { } - - public: - virtual Ignore *Find(const Anope::string &mask) anope_abstract; -}; - -static ServiceReference ignore_service("IgnoreService", "ignore"); - diff --git a/include/modules/os_info.h b/include/modules/os_info.h deleted file mode 100644 index 6e819158d..000000000 --- a/include/modules/os_info.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * (C) 2014 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for further details. - */ - -class OperInfo : public Serialize::Object -{ - protected: - using Serialize::Object::Object; - - public: - virtual Serialize::Object *GetTarget() anope_abstract; - virtual void SetTarget(Serialize::Object *) anope_abstract; - - virtual Anope::string GetInfo() anope_abstract; - virtual void SetInfo(const Anope::string &) anope_abstract; - - virtual Anope::string GetCreator() anope_abstract; - virtual void SetCreator(const Anope::string &) anope_abstract; - - virtual time_t GetCreated() anope_abstract; - virtual void SetCreated(const time_t &) anope_abstract; -}; - -static Serialize::TypeReference operinfo("OperInfo"); - diff --git a/include/modules/os_news.h b/include/modules/os_news.h deleted file mode 100644 index 07627b1bc..000000000 --- a/include/modules/os_news.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef OS_NEWS -#define OS_NEWS - -enum NewsType -{ - NEWS_LOGON, - NEWS_RANDOM, - NEWS_OPER -}; - -class NewsItem : public Serialize::Object -{ - public: - using Serialize::Object::Object; - - virtual NewsType GetNewsType() anope_abstract; - virtual void SetNewsType(const NewsType &) anope_abstract; - - virtual Anope::string GetText() anope_abstract; - virtual void SetText(const Anope::string &) anope_abstract; - - virtual Anope::string GetWho() anope_abstract; - virtual void SetWho(const Anope::string &) anope_abstract; - - virtual time_t GetTime() anope_abstract; - virtual void SetTime(const time_t &) anope_abstract; -}; - -static Serialize::TypeReference newsitem("NewsItem"); - -#endif // OS_NEWS - diff --git a/include/modules/os_session.h b/include/modules/os_session.h deleted file mode 100644 index b9afd196e..000000000 --- a/include/modules/os_session.h +++ /dev/null @@ -1,77 +0,0 @@ - -#pragma once - -struct Session -{ - cidr addr; /* A cidr (sockaddrs + len) representing this session */ - unsigned int count = 1; /* Number of clients with this host */ - unsigned int hits = 0; /* Number of subsequent kills for a host */ - - Session(const sockaddrs &ip, int len) : addr(ip, len) { } -}; - -class Exception : public Serialize::Object -{ - protected: - using Serialize::Object::Object; - - public: - - virtual Anope::string GetMask() anope_abstract; - virtual void SetMask(const Anope::string &) anope_abstract; - - virtual unsigned int GetLimit() anope_abstract; - virtual void SetLimit(unsigned int) anope_abstract; - - virtual Anope::string GetWho() anope_abstract; - virtual void SetWho(const Anope::string &) anope_abstract; - - virtual Anope::string GetReason() anope_abstract; - virtual void SetReason(const Anope::string &) anope_abstract; - - virtual time_t GetTime() anope_abstract; - virtual void SetTime(const time_t &) anope_abstract; - - virtual time_t GetExpires() anope_abstract; - virtual void SetExpires(const time_t &) anope_abstract; -}; - -static Serialize::TypeReference exception("Exception"); - -class SessionService : public Service -{ - public: - typedef std::unordered_map SessionMap; - - SessionService(Module *m) : Service(m, "SessionService", "session") { } - - virtual Exception *FindException(User *u) anope_abstract; - - virtual Exception *FindException(const Anope::string &host) anope_abstract; - - virtual Session *FindSession(const Anope::string &ip) anope_abstract; - - virtual SessionMap &GetSessions() anope_abstract; -}; - -static ServiceReference session_service("SessionService", "session"); - -namespace Event -{ - struct CoreExport Exception : Events - { - /** Called after an exception has been added - * @param ex The exception - * @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it - */ - virtual EventReturn OnExceptionAdd(::Exception *ex) anope_abstract; - - /** Called before an exception is deleted - * @param source The source deleting it - * @param ex The exceotion - */ - virtual void OnExceptionDel(CommandSource &source, ::Exception *ex) anope_abstract; - }; -} - -template<> struct EventName { static constexpr const char *const name = "Exception"; }; diff --git a/modules/botserv/assign.cpp b/modules/botserv/assign.cpp index 840651dfc..1d2755ad5 100644 --- a/modules/botserv/assign.cpp +++ b/modules/botserv/assign.cpp @@ -10,7 +10,7 @@ */ #include "module.h" -#include "modules/bs_info.h" +#include "modules/botserv/info.h" class CommandBSAssign : public Command { diff --git a/modules/botserv/badwords.cpp b/modules/botserv/badwords.cpp index 6a092e36b..afdc2e09f 100644 --- a/modules/botserv/badwords.cpp +++ b/modules/botserv/badwords.cpp @@ -10,7 +10,7 @@ */ #include "module.h" -#include "modules/bs_badwords.h" +#include "modules/botserv/badwords.h" static EventHandlers *bwevents; diff --git a/modules/botserv/bot.cpp b/modules/botserv/bot.cpp index 726c02ab2..b2630bfcb 100644 --- a/modules/botserv/bot.cpp +++ b/modules/botserv/bot.cpp @@ -10,7 +10,7 @@ */ #include "module.h" -#include "modules/bs_bot.h" +#include "modules/botserv/bot.h" class CommandBSBot : public Command { diff --git a/modules/botserv/info.cpp b/modules/botserv/info.cpp index 6d74c308e..19fe0a775 100644 --- a/modules/botserv/info.cpp +++ b/modules/botserv/info.cpp @@ -12,7 +12,7 @@ */ #include "module.h" -#include "modules/bs_info.h" +#include "modules/botserv/info.h" class CommandBSInfo : public Command { diff --git a/modules/botserv/kick.cpp b/modules/botserv/kick.cpp index 70ed5b2ad..f61c7eb94 100644 --- a/modules/botserv/kick.cpp +++ b/modules/botserv/kick.cpp @@ -12,9 +12,9 @@ */ #include "module.h" -#include "modules/bs_kick.h" -#include "modules/bs_badwords.h" -#include "modules/bs_info.h" +#include "modules/botserv/kick.h" +#include "modules/botserv/badwords.h" +#include "modules/botserv/info.h" static Module *me; diff --git a/modules/botserv/set.cpp b/modules/botserv/set.cpp index 6e2ae998f..b480108af 100644 --- a/modules/botserv/set.cpp +++ b/modules/botserv/set.cpp @@ -10,7 +10,7 @@ */ #include "module.h" -#include "modules/bs_kick.h" +#include "modules/botserv/kick.h" class CommandBSSet : public Command { diff --git a/modules/chanserv/akick.cpp b/modules/chanserv/akick.cpp index 8cd1f778a..68adec8df 100644 --- a/modules/chanserv/akick.cpp +++ b/modules/chanserv/akick.cpp @@ -10,7 +10,7 @@ */ #include "module.h" -#include "modules/cs_akick.h" +#include "modules/chanserv/akick.h" class AutoKickImpl : public AutoKick { diff --git a/modules/chanserv/clone.cpp b/modules/chanserv/clone.cpp index 256446bd1..0cc1b2739 100644 --- a/modules/chanserv/clone.cpp +++ b/modules/chanserv/clone.cpp @@ -10,8 +10,8 @@ */ #include "module.h" -#include "modules/bs_badwords.h" -#include "modules/cs_akick.h" +#include "modules/botserv/badwords.h" +#include "modules/chanserv/akick.h" class CommandCSClone : public Command { diff --git a/modules/chanserv/drop.cpp b/modules/chanserv/drop.cpp index a1020bcab..cb2036694 100644 --- a/modules/chanserv/drop.cpp +++ b/modules/chanserv/drop.cpp @@ -10,7 +10,7 @@ */ #include "module.h" -#include "modules/cs_drop.h" +#include "modules/chanserv/drop.h" class CommandCSDrop : public Command { diff --git a/modules/chanserv/entrymsg.cpp b/modules/chanserv/entrymsg.cpp index 31253599e..ac46809fd 100644 --- a/modules/chanserv/entrymsg.cpp +++ b/modules/chanserv/entrymsg.cpp @@ -10,7 +10,7 @@ */ #include "module.h" -#include "modules/cs_entrymsg.h" +#include "modules/chanserv/entrymsg.h" class EntryMsgImpl : public EntryMsg { diff --git a/modules/chanserv/info.cpp b/modules/chanserv/info.cpp index 267aee66a..4f3895cc4 100644 --- a/modules/chanserv/info.cpp +++ b/modules/chanserv/info.cpp @@ -10,7 +10,7 @@ */ #include "module.h" -#include "modules/cs_info.h" +#include "modules/chanserv/info.h" class CommandCSInfo : public Command { diff --git a/modules/chanserv/list.cpp b/modules/chanserv/list.cpp index 5a4c58bff..ad0460239 100644 --- a/modules/chanserv/list.cpp +++ b/modules/chanserv/list.cpp @@ -10,9 +10,9 @@ */ #include "module.h" -#include "modules/cs_info.h" -#include "modules/cs_set.h" -#include "modules/cs_mode.h" +#include "modules/chanserv/info.h" +#include "modules/chanserv/set.h" +#include "modules/chanserv/mode.h" class CommandCSList : public Command { diff --git a/modules/chanserv/log.cpp b/modules/chanserv/log.cpp index 6a90115f5..43ed76291 100644 --- a/modules/chanserv/log.cpp +++ b/modules/chanserv/log.cpp @@ -10,7 +10,7 @@ */ #include "module.h" -#include "modules/cs_log.h" +#include "modules/chanserv/log.h" #include "modules/memoserv.h" class LogSettingImpl : public LogSetting diff --git a/modules/chanserv/main/channel.cpp b/modules/chanserv/main/channel.cpp index b24edcc0c..7190b8bd9 100644 --- a/modules/chanserv/main/channel.cpp +++ b/modules/chanserv/main/channel.cpp @@ -12,7 +12,7 @@ #include "module.h" #include "channeltype.h" -#include "modules/cs_akick.h" +#include "modules/chanserv/akick.h" ChannelImpl::ChannelImpl(Serialize::TypeBase *type, const Anope::string &chname) : ChanServ::Channel(type) { diff --git a/modules/chanserv/main/chanserv.cpp b/modules/chanserv/main/chanserv.cpp index 420051252..9336b7c53 100644 --- a/modules/chanserv/main/chanserv.cpp +++ b/modules/chanserv/main/chanserv.cpp @@ -10,12 +10,12 @@ */ #include "module.h" -#include "modules/cs_mode.h" +#include "modules/chanserv/mode.h" #include "modules/help.h" -#include "modules/bs_bot.h" +#include "modules/botserv/bot.h" #include "modules/chanserv.h" -#include "modules/cs_info.h" -#include "modules/cs_akick.h" +#include "modules/chanserv/info.h" +#include "modules/chanserv/akick.h" #include "channeltype.h" #include "leveltype.h" #include "modetype.h" diff --git a/modules/chanserv/mode.cpp b/modules/chanserv/mode.cpp index 121179a58..eb1350e5a 100644 --- a/modules/chanserv/mode.cpp +++ b/modules/chanserv/mode.cpp @@ -10,8 +10,8 @@ */ #include "module.h" -#include "modules/cs_mode.h" -#include "modules/cs_info.h" +#include "modules/chanserv/mode.h" +#include "modules/chanserv/info.h" static EventHandlers *events; diff --git a/modules/chanserv/set.cpp b/modules/chanserv/set.cpp index 06c996f52..a56afa141 100644 --- a/modules/chanserv/set.cpp +++ b/modules/chanserv/set.cpp @@ -10,10 +10,10 @@ */ #include "module.h" -#include "modules/cs_mode.h" +#include "modules/chanserv/mode.h" #include "modules/chanserv.h" -#include "modules/cs_info.h" -#include "modules/cs_set.h" +#include "modules/chanserv/info.h" +#include "modules/chanserv/set.h" class CommandCSSet : public Command { diff --git a/modules/chanserv/set_misc.cpp b/modules/chanserv/set_misc.cpp index 7af347087..71087138a 100644 --- a/modules/chanserv/set_misc.cpp +++ b/modules/chanserv/set_misc.cpp @@ -9,9 +9,9 @@ */ #include "module.h" -#include "modules/cs_set_misc.h" -#include "modules/cs_info.h" -#include "modules/cs_set.h" +#include "modules/chanserv/set_misc.h" +#include "modules/chanserv/info.h" +#include "modules/chanserv/set.h" static Anope::map descriptions; diff --git a/modules/chanserv/status.cpp b/modules/chanserv/status.cpp index 35676fa53..98dbbe8d2 100644 --- a/modules/chanserv/status.cpp +++ b/modules/chanserv/status.cpp @@ -10,7 +10,7 @@ */ #include "module.h" -#include "modules/cs_akick.h" +#include "modules/chanserv/akick.h" class CommandCSStatus : public Command { diff --git a/modules/chanserv/suspend.cpp b/modules/chanserv/suspend.cpp index 73a034192..44259f341 100644 --- a/modules/chanserv/suspend.cpp +++ b/modules/chanserv/suspend.cpp @@ -10,10 +10,10 @@ */ #include "module.h" -#include "modules/cs_suspend.h" -#include "modules/cs_drop.h" +#include "modules/chanserv/suspend.h" +#include "modules/chanserv/drop.h" #include "modules/chanserv.h" -#include "modules/cs_info.h" +#include "modules/chanserv/info.h" class CSSuspendInfoImpl : public CSSuspendInfo { diff --git a/modules/chanserv/topic.cpp b/modules/chanserv/topic.cpp index a132900a6..aab3f8dbf 100644 --- a/modules/chanserv/topic.cpp +++ b/modules/chanserv/topic.cpp @@ -10,9 +10,9 @@ */ #include "module.h" -#include "modules/cs_mode.h" -#include "modules/cs_info.h" -#include "modules/cs_set.h" +#include "modules/chanserv/mode.h" +#include "modules/chanserv/info.h" +#include "modules/chanserv/set.h" class CommandCSSetKeepTopic : public Command { diff --git a/modules/database/old.cpp b/modules/database/old.cpp index 3d9b92922..27fb3565d 100644 --- a/modules/database/old.cpp +++ b/modules/database/old.cpp @@ -9,17 +9,17 @@ */ #include "module.h" -#include "modules/os_session.h" -#include "modules/bs_kick.h" -#include "modules/cs_mode.h" -#include "modules/bs_badwords.h" -#include "modules/os_news.h" -#include "modules/os_forbid.h" -#include "modules/cs_entrymsg.h" -#include "modules/ns_suspend.h" -#include "modules/cs_suspend.h" -#include "modules/cs_access.h" -#include "modules/ns_access.h" +#include "modules/operserv/session.h" +#include "modules/botserv/kick.h" +#include "modules/chanserv/mode.h" +#include "modules/botserv/badwords.h" +#include "modules/operserv/news.h" +#include "modules/operserv/forbid.h" +#include "modules/chanserv/entrymsg.h" +#include "modules/nickserv/suspend.h" +#include "modules/chanserv/suspend.h" +#include "modules/chanserv/access.h" +#include "modules/nickserv/access.h" #define READ(x) \ if (true) \ diff --git a/modules/fantasy.cpp b/modules/fantasy.cpp index 3781b5b83..3730f7e70 100644 --- a/modules/fantasy.cpp +++ b/modules/fantasy.cpp @@ -11,7 +11,7 @@ #include "module.h" #include "modules/fantasy.h" -#include "modules/bs_info.h" +#include "modules/botserv/info.h" class CommandBSSetFantasy : public Command { diff --git a/modules/greet.cpp b/modules/greet.cpp index ebc8c1612..69039849c 100644 --- a/modules/greet.cpp +++ b/modules/greet.cpp @@ -10,9 +10,9 @@ */ #include "module.h" -#include "modules/ns_info.h" -#include "modules/bs_info.h" -#include "modules/ns_set.h" +#include "modules/nickserv/info.h" +#include "modules/botserv/info.h" +#include "modules/nickserv/set.h" class CommandBSSetGreet : public Command { diff --git a/modules/hostserv/del.cpp b/modules/hostserv/del.cpp index b45c10a61..0830cd5b5 100644 --- a/modules/hostserv/del.cpp +++ b/modules/hostserv/del.cpp @@ -10,7 +10,7 @@ */ #include "module.h" -#include "modules/hs_del.h" +#include "modules/hostserv/del.h" class CommandHSDel : public Command { diff --git a/modules/hostserv/group.cpp b/modules/hostserv/group.cpp index c3971fdea..3aff66e27 100644 --- a/modules/hostserv/group.cpp +++ b/modules/hostserv/group.cpp @@ -10,7 +10,7 @@ */ #include "module.h" -#include "modules/ns_group.h" +#include "modules/nickserv/group.h" class CommandHSGroup : public Command { diff --git a/modules/hostserv/main/hostserv.cpp b/modules/hostserv/main/hostserv.cpp index 285ea893b..8fdfa560e 100644 --- a/modules/hostserv/main/hostserv.cpp +++ b/modules/hostserv/main/hostserv.cpp @@ -10,8 +10,8 @@ */ #include "module.h" -#include "modules/ns_update.h" -#include "modules/hs_del.h" +#include "modules/nickserv/update.h" +#include "modules/hostserv/del.h" #include "modules/help.h" class HostServCore : public Module diff --git a/modules/memoserv/main/memoserv.cpp b/modules/memoserv/main/memoserv.cpp index a52ee746c..ed3939ef7 100644 --- a/modules/memoserv/main/memoserv.cpp +++ b/modules/memoserv/main/memoserv.cpp @@ -10,9 +10,9 @@ */ #include "module.h" -#include "modules/ns_update.h" +#include "modules/nickserv/update.h" #include "modules/help.h" -#include "modules/bs_bot.h" +#include "modules/botserv/bot.h" #include "modules/memoserv.h" //#include "memoinfo.h" //#include "memo.h" diff --git a/modules/nickserv/access.cpp b/modules/nickserv/access.cpp index ba2116ac9..0e405484c 100644 --- a/modules/nickserv/access.cpp +++ b/modules/nickserv/access.cpp @@ -11,7 +11,7 @@ #include "module.h" #include "modules/nickserv.h" -#include "modules/ns_access.h" +#include "modules/nickserv/access.h" class NickAccessImpl : public NickAccess { diff --git a/modules/nickserv/ajoin.cpp b/modules/nickserv/ajoin.cpp index 135beb403..0b074a84a 100644 --- a/modules/nickserv/ajoin.cpp +++ b/modules/nickserv/ajoin.cpp @@ -10,7 +10,7 @@ */ #include "module.h" -#include "modules/ns_ajoin.h" +#include "modules/nickserv/ajoin.h" class AutoJoinImpl : public AutoJoin { diff --git a/modules/nickserv/cert.cpp b/modules/nickserv/cert.cpp index fc87f8cb0..23487f305 100644 --- a/modules/nickserv/cert.cpp +++ b/modules/nickserv/cert.cpp @@ -10,7 +10,7 @@ */ #include "module.h" -#include "modules/ns_cert.h" +#include "modules/nickserv/cert.h" #include "modules/nickserv.h" static Anope::hash_map certmap; diff --git a/modules/nickserv/drop.cpp b/modules/nickserv/drop.cpp index 62ee41970..e1eba9a3c 100644 --- a/modules/nickserv/drop.cpp +++ b/modules/nickserv/drop.cpp @@ -10,7 +10,7 @@ */ #include "module.h" -#include "modules/ns_drop.h" +#include "modules/nickserv/drop.h" class CommandNSDrop : public Command { diff --git a/modules/nickserv/group.cpp b/modules/nickserv/group.cpp index 9a9b933f4..3a50d0306 100644 --- a/modules/nickserv/group.cpp +++ b/modules/nickserv/group.cpp @@ -10,8 +10,8 @@ */ #include "module.h" -#include "modules/ns_cert.h" -#include "modules/ns_group.h" +#include "modules/nickserv/cert.h" +#include "modules/nickserv/group.h" class NSGroupRequestListener : public NickServ::IdentifyRequestListener { diff --git a/modules/nickserv/info.cpp b/modules/nickserv/info.cpp index 7091e53fd..0bc712ac9 100644 --- a/modules/nickserv/info.cpp +++ b/modules/nickserv/info.cpp @@ -10,8 +10,8 @@ */ #include "module.h" -#include "modules/ns_info.h" -#include "modules/ns_set.h" +#include "modules/nickserv/info.h" +#include "modules/nickserv/set.h" class CommandNSInfo : public Command { diff --git a/modules/nickserv/list.cpp b/modules/nickserv/list.cpp index 2820326d2..53a3a9394 100644 --- a/modules/nickserv/list.cpp +++ b/modules/nickserv/list.cpp @@ -10,8 +10,8 @@ */ #include "module.h" -#include "modules/ns_info.h" -#include "modules/ns_set.h" +#include "modules/nickserv/info.h" +#include "modules/nickserv/set.h" class CommandNSList : public Command { diff --git a/modules/nickserv/main/account.cpp b/modules/nickserv/main/account.cpp index 85adf1a33..d74154d97 100644 --- a/modules/nickserv/main/account.cpp +++ b/modules/nickserv/main/account.cpp @@ -12,7 +12,7 @@ #include "module.h" #include "accounttype.h" -#include "modules/ns_access.h" +#include "modules/nickserv/access.h" AccountImpl::~AccountImpl() { diff --git a/modules/nickserv/main/nickserv.cpp b/modules/nickserv/main/nickserv.cpp index f14a71d87..85ac34b12 100644 --- a/modules/nickserv/main/nickserv.cpp +++ b/modules/nickserv/main/nickserv.cpp @@ -10,9 +10,9 @@ */ #include "module.h" -#include "modules/ns_info.h" -#include "modules/ns_group.h" -#include "modules/ns_update.h" +#include "modules/nickserv/info.h" +#include "modules/nickserv/group.h" +#include "modules/nickserv/update.h" #include "modules/help.h" #include "modules/nickserv.h" #include "identifyrequest.h" diff --git a/modules/nickserv/recover.cpp b/modules/nickserv/recover.cpp index 65033bab9..c95d3f135 100644 --- a/modules/nickserv/recover.cpp +++ b/modules/nickserv/recover.cpp @@ -10,7 +10,7 @@ */ #include "module.h" -#include "modules/ns_cert.h" +#include "modules/nickserv/cert.h" #include "modules/nickserv.h" typedef std::map NSRecoverInfo; diff --git a/modules/nickserv/set.cpp b/modules/nickserv/set.cpp index a75386743..337bdab9d 100644 --- a/modules/nickserv/set.cpp +++ b/modules/nickserv/set.cpp @@ -10,8 +10,8 @@ */ #include "module.h" -#include "modules/ns_info.h" -#include "modules/ns_set.h" +#include "modules/nickserv/info.h" +#include "modules/nickserv/set.h" #include "modules/nickserv.h" class CommandNSSet : public Command diff --git a/modules/nickserv/set_misc.cpp b/modules/nickserv/set_misc.cpp index 5d03797b1..347ae034c 100644 --- a/modules/nickserv/set_misc.cpp +++ b/modules/nickserv/set_misc.cpp @@ -10,9 +10,9 @@ */ #include "module.h" -#include "modules/ns_set_misc.h" -#include "modules/ns_info.h" -#include "modules/ns_set.h" +#include "modules/nickserv/set_misc.h" +#include "modules/nickserv/info.h" +#include "modules/nickserv/set.h" static Anope::map descriptions; diff --git a/modules/nickserv/suspend.cpp b/modules/nickserv/suspend.cpp index 2859eacc1..b56e68f97 100644 --- a/modules/nickserv/suspend.cpp +++ b/modules/nickserv/suspend.cpp @@ -10,8 +10,8 @@ */ #include "module.h" -#include "modules/ns_suspend.h" -#include "modules/ns_info.h" +#include "modules/nickserv/suspend.h" +#include "modules/nickserv/info.h" #include "modules/nickserv.h" class NSSuspendInfoImpl : public NSSuspendInfo diff --git a/modules/nickserv/update.cpp b/modules/nickserv/update.cpp index 0022f389d..6781585d3 100644 --- a/modules/nickserv/update.cpp +++ b/modules/nickserv/update.cpp @@ -10,7 +10,7 @@ */ #include "module.h" -#include "modules/ns_update.h" +#include "modules/nickserv/update.h" class CommandNSUpdate : public Command { diff --git a/modules/operserv/defcon.cpp b/modules/operserv/defcon.cpp index 804b66c27..fc4a096c9 100644 --- a/modules/operserv/defcon.cpp +++ b/modules/operserv/defcon.cpp @@ -10,8 +10,8 @@ */ #include "module.h" -#include "modules/os_session.h" -#include "modules/os_defcon.h" +#include "modules/operserv/session.h" +#include "modules/operserv/defcon.h" #include "modules/global.h" enum DefconLevel diff --git a/modules/operserv/dns.cpp b/modules/operserv/dns.cpp index a231a1e74..1d714700d 100644 --- a/modules/operserv/dns.cpp +++ b/modules/operserv/dns.cpp @@ -7,7 +7,7 @@ #include "module.h" #include "modules/dns.h" -#include "modules/os_dns.h" +#include "modules/operserv/dns.h" static std::map > server_quit_times; diff --git a/modules/operserv/forbid.cpp b/modules/operserv/forbid.cpp index 0a7b1c209..2375eddcd 100644 --- a/modules/operserv/forbid.cpp +++ b/modules/operserv/forbid.cpp @@ -10,7 +10,7 @@ */ #include "module.h" -#include "modules/os_forbid.h" +#include "modules/operserv/forbid.h" #include "modules/nickserv.h" #include "modules/chanserv.h" diff --git a/modules/operserv/ignore.cpp b/modules/operserv/ignore.cpp index c55e6f3dc..0aeab0718 100644 --- a/modules/operserv/ignore.cpp +++ b/modules/operserv/ignore.cpp @@ -10,7 +10,7 @@ */ #include "module.h" -#include "modules/os_ignore.h" +#include "modules/operserv/ignore.h" class IgnoreImpl : public Ignore { diff --git a/modules/operserv/info.cpp b/modules/operserv/info.cpp index c7749c589..bb0eb8274 100644 --- a/modules/operserv/info.cpp +++ b/modules/operserv/info.cpp @@ -7,9 +7,9 @@ */ #include "module.h" -#include "modules/ns_info.h" -#include "modules/cs_info.h" -#include "modules/os_info.h" +#include "modules/nickserv/info.h" +#include "modules/chanserv/info.h" +#include "modules/operserv/info.h" class OperInfoImpl : public OperInfo { diff --git a/modules/operserv/news.cpp b/modules/operserv/news.cpp index 03a1e3a57..c14103f2e 100644 --- a/modules/operserv/news.cpp +++ b/modules/operserv/news.cpp @@ -10,7 +10,7 @@ */ #include "module.h" -#include "modules/os_news.h" +#include "modules/operserv/news.h" /* List of messages for each news type. This simplifies message sending. */ diff --git a/modules/operserv/session.cpp b/modules/operserv/session.cpp index 997914360..0c20e6d7a 100644 --- a/modules/operserv/session.cpp +++ b/modules/operserv/session.cpp @@ -10,7 +10,7 @@ */ #include "module.h" -#include "modules/os_session.h" +#include "modules/operserv/session.h" namespace { diff --git a/modules/operserv/stats.cpp b/modules/operserv/stats.cpp index 6e74303ce..025fe566c 100644 --- a/modules/operserv/stats.cpp +++ b/modules/operserv/stats.cpp @@ -10,7 +10,7 @@ */ #include "module.h" -#include "modules/os_session.h" +#include "modules/operserv/session.h" #if 0 struct Stats : Serialize::Object diff --git a/modules/protocol/charybdis.cpp b/modules/protocol/charybdis.cpp index 50da90902..fc59a7214 100644 --- a/modules/protocol/charybdis.cpp +++ b/modules/protocol/charybdis.cpp @@ -11,7 +11,7 @@ #if 0 #include "module.h" -#include "modules/cs_mode.h" +#include "modules/chanserv/mode.h" #include "modules/sasl.h" static Anope::string UplinkSID; diff --git a/modules/protocol/inspircd20.cpp b/modules/protocol/inspircd20.cpp index 63cdc1973..f4c8bcf37 100644 --- a/modules/protocol/inspircd20.cpp +++ b/modules/protocol/inspircd20.cpp @@ -11,8 +11,8 @@ #include "module.h" #include "modules/sasl.h" -#include "modules/cs_mode.h" -#include "modules/cs_set.h" +#include "modules/chanserv/mode.h" +#include "modules/chanserv/set.h" struct SASLUser { diff --git a/modules/protocol/unreal.cpp b/modules/protocol/unreal.cpp index 6bcaaab26..3bb8ab93a 100644 --- a/modules/protocol/unreal.cpp +++ b/modules/protocol/unreal.cpp @@ -10,7 +10,7 @@ */ #include "module.h" -#include "modules/cs_mode.h" +#include "modules/chanserv/mode.h" #include "modules/sasl.h" class UnrealIRCdProto : public IRCDProto diff --git a/modules/sasl.cpp b/modules/sasl.cpp index f12cae8b8..174e86ab0 100644 --- a/modules/sasl.cpp +++ b/modules/sasl.cpp @@ -8,7 +8,7 @@ #include "module.h" #include "modules/sasl.h" -#include "modules/ns_cert.h" +#include "modules/nickserv/cert.h" using namespace SASL; diff --git a/modules/webcpanel/pages/chanserv/akick.cpp b/modules/webcpanel/pages/chanserv/akick.cpp index 0cfaaaba9..97f6aa2ef 100644 --- a/modules/webcpanel/pages/chanserv/akick.cpp +++ b/modules/webcpanel/pages/chanserv/akick.cpp @@ -7,7 +7,7 @@ #include "../../webcpanel.h" #include "utils.h" -#include "modules/cs_akick.h" +#include "modules/chanserv/akick.h" WebCPanel::ChanServ::Akick::Akick(const Anope::string &cat, const Anope::string &u) : WebPanelProtectedPage(cat, u) { diff --git a/modules/webcpanel/pages/nickserv/access.cpp b/modules/webcpanel/pages/nickserv/access.cpp index 779f891b5..51472058d 100644 --- a/modules/webcpanel/pages/nickserv/access.cpp +++ b/modules/webcpanel/pages/nickserv/access.cpp @@ -6,7 +6,7 @@ */ #include "../../webcpanel.h" -#include "modules/ns_access.h" +#include "modules/nickserv/access.h" WebCPanel::NickServ::Access::Access(const Anope::string &cat, const Anope::string &u) : WebPanelProtectedPage(cat, u) { diff --git a/modules/webcpanel/pages/nickserv/cert.cpp b/modules/webcpanel/pages/nickserv/cert.cpp index 25958ca73..436725b04 100644 --- a/modules/webcpanel/pages/nickserv/cert.cpp +++ b/modules/webcpanel/pages/nickserv/cert.cpp @@ -6,7 +6,7 @@ */ #include "../../webcpanel.h" -#include "modules/ns_cert.h" +#include "modules/nickserv/cert.h" WebCPanel::NickServ::Cert::Cert(const Anope::string &cat, const Anope::string &u) : WebPanelProtectedPage(cat, u) { -- cgit