From 527077d8c00e69b536a18a7eedaaa54a79c53619 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 9 Jan 2006 21:59:58 +0000 Subject: Untested priority system for modules to move themselves to the start or end of the module queue git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2758 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/inspircd.h | 3 +++ include/modules.h | 4 ++++ 2 files changed, 7 insertions(+) (limited to 'include') diff --git a/include/inspircd.h b/include/inspircd.h index e41482341..2f1b8bc1a 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -104,6 +104,7 @@ class InspIRCd void erase_factory(int j); void erase_module(int j); void BuildISupport(); + void MoveTo(std::string modulename,int slot); public: time_t startup_time; @@ -118,6 +119,8 @@ class InspIRCd char* ModuleError(); bool LoadModule(const char* filename); bool UnloadModule(const char* filename); + void MoveToLast(std::string modulename); + void MoveToFirst(std::string modulename); InspIRCd(int argc, char** argv); int Run(); diff --git a/include/modules.h b/include/modules.h index 1530592d3..5f9dfa29a 100644 --- a/include/modules.h +++ b/include/modules.h @@ -274,6 +274,8 @@ class ExtMode : public classbase }; +enum Priority { PRIORITY_FIRST, PRIORITY_DONTCARE, PRIORITY_LAST }; + enum Implementation { I_OnUserConnect, I_OnUserQuit, I_OnUserDisconnect, I_OnUserJoin, I_OnUserPart, I_OnRehash, I_OnServerRaw, I_OnExtendedMode, I_OnUserPreJoin, I_OnUserPreKick, I_OnUserKick, I_OnOper, I_OnInfo, I_OnWhois, I_OnUserPreInvite, I_OnUserInvite, I_OnUserPreMessage, I_OnUserPreNotice, I_OnUserPreNick, I_OnUserMessage, I_OnUserNotice, I_OnMode, @@ -315,6 +317,8 @@ class Module : public classbase virtual void Implements(char* Implements); + virtual Priority Prioritize(); + /** Called when a user connects. * The details of the connecting user are available to you in the parameter userrec *user * @param user The user who is connecting -- cgit v1.2.3