diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-26 17:57:24 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-26 17:57:24 +0000 |
commit | bd59b1a9a283c09b318bd3a6cb93774d5961b794 (patch) | |
tree | a6a24a33ef748ec2c0e080acb51f961e9e4a81f0 /src | |
parent | a9b90ecb4329498aba52da6aaa9812e3a70b8e11 (diff) |
Fixed support for implementation hooks
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2654 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd_eline.cpp | 1 | ||||
-rw-r--r-- | src/cmd_gline.cpp | 1 | ||||
-rw-r--r-- | src/cmd_info.cpp | 1 | ||||
-rw-r--r-- | src/cmd_invite.cpp | 1 | ||||
-rw-r--r-- | src/cmd_qline.cpp | 1 | ||||
-rw-r--r-- | src/cmd_zline.cpp | 1 | ||||
-rw-r--r-- | src/inspircd.cpp | 7 | ||||
-rw-r--r-- | src/mode.cpp | 2 | ||||
-rw-r--r-- | src/modules.cpp | 2 |
9 files changed, 14 insertions, 3 deletions
diff --git a/src/cmd_eline.cpp b/src/cmd_eline.cpp index 7927dcad1..b92c17d31 100644 --- a/src/cmd_eline.cpp +++ b/src/cmd_eline.cpp @@ -42,6 +42,7 @@ using namespace std; #include "cmd_eline.h" extern int MODCOUNT; +extern ServerConfig* Config; extern std::vector<Module*> modules; extern std::vector<ircd_module*> factory; diff --git a/src/cmd_gline.cpp b/src/cmd_gline.cpp index f3d8ee170..d99435e4f 100644 --- a/src/cmd_gline.cpp +++ b/src/cmd_gline.cpp @@ -41,6 +41,7 @@ using namespace std; #include "command_parse.h" #include "cmd_eline.h" +extern ServerConfig* Config; extern int MODCOUNT; extern std::vector<Module*> modules; extern std::vector<ircd_module*> factory; diff --git a/src/cmd_info.cpp b/src/cmd_info.cpp index 0f9abf8d5..ad1464afb 100644 --- a/src/cmd_info.cpp +++ b/src/cmd_info.cpp @@ -33,6 +33,7 @@ using namespace std; #include "typedefs.h" #include "cmd_info.h" +extern ServerConfig* Config; extern int MODCOUNT; extern std::vector<Module*> modules; extern std::vector<ircd_module*> factory; diff --git a/src/cmd_invite.cpp b/src/cmd_invite.cpp index b99f80db4..a91c5ba4c 100644 --- a/src/cmd_invite.cpp +++ b/src/cmd_invite.cpp @@ -36,6 +36,7 @@ using namespace std; #include "command_parse.h" #include "cmd_invite.h" +extern ServerConfig* Config; extern int MODCOUNT; extern std::vector<Module*> modules; extern std::vector<ircd_module*> factory; diff --git a/src/cmd_qline.cpp b/src/cmd_qline.cpp index 2b1361fcc..91b875b27 100644 --- a/src/cmd_qline.cpp +++ b/src/cmd_qline.cpp @@ -41,6 +41,7 @@ using namespace std; #include "command_parse.h" #include "cmd_eline.h" +extern ServerConfig* Config; extern int MODCOUNT; extern std::vector<Module*> modules; extern std::vector<ircd_module*> factory; diff --git a/src/cmd_zline.cpp b/src/cmd_zline.cpp index 99be92980..048fa9140 100644 --- a/src/cmd_zline.cpp +++ b/src/cmd_zline.cpp @@ -41,6 +41,7 @@ using namespace std; #include "command_parse.h" #include "cmd_eline.h" +extern ServerConfig* Config; extern int MODCOUNT; extern std::vector<Module*> modules; extern std::vector<ircd_module*> factory; diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 33190e171..f15fba3a0 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -359,7 +359,12 @@ bool InspIRCd::LoadModule(const char* filename) /* save the module and the module's classfactory, if * this isnt done, random crashes can occur :/ */ Config->module_names.push_back(filename); - modules[MODCOUNT+1]->Implements(Config->implement_lists[MODCOUNT+1]); + + char* x = &Config->implement_lists[MODCOUNT+1][0]; + for(int t = 0; t < 255; t++) + x[t] = 0; + + modules[MODCOUNT+1]->Implements(x); } else { diff --git a/src/mode.cpp b/src/mode.cpp index e1bfe56e2..787e9f1f3 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -562,7 +562,7 @@ void ModeParser::ProcessModes(char **parameters,userrec* user,chanrec *chan,int } int MOD_RESULT = 0; - FOREACH_RESULT(I_OnAccessCheck(user,NULL,chan,AC_GENERAL_MODE)); + FOREACH_RESULT(I_OnAccessCheck,OnAccessCheck(user,NULL,chan,AC_GENERAL_MODE)); if (MOD_RESULT == ACR_DENY) return; diff --git a/src/modules.cpp b/src/modules.cpp index 01aef0802..cb9a228a2 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -296,7 +296,7 @@ void Module::OnDelKLine(userrec* source, std::string hostmask) { }; void Module::OnDelQLine(userrec* source, std::string nickmask) { }; void Module::OnDelELine(userrec* source, std::string hostmask) { }; void Module::OnCleanup(int target_type, void* item) { }; -void Module::Implements(bool &Implements[255]) { for (int j = 0; j < 255; j++) Implements[j] = false; }; +void Module::Implements(char* Implements) { for (int j = 0; j < 255; j++) Implements[j] = 0; }; /* server is a wrapper class that provides methods to all of the C-style * exports in the core |