diff options
| author | 2006-01-25 16:31:05 +0000 | |
|---|---|---|
| committer | 2006-01-25 16:31:05 +0000 | |
| commit | cdaf7ac3781a0ea1bfbfac85c4a428ddea7725f9 (patch) | |
| tree | 84758aa082957cf9c19fa59df9b55d06e33fb9dd /src/modules.cpp | |
| parent | Added -modupdate to regenerate modules makefile (diff) | |
Added PRIORITY_BEFORE and PRIORITY_AFTER (see src/modules/m_hostchange.cpp for how it works, function Prioritize())
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2889 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules.cpp')
| -rw-r--r-- | src/modules.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/modules.cpp b/src/modules.cpp index 2cfb586ca..0a2115916 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -335,6 +335,30 @@ void Server::RemoveSocket(InspSocket* sock) } } +long Server::PriorityAfter(std::string modulename) +{ + for (unsigned int j = 0; j < Config->module_names.size(); j++) + { + if (Config->module_names[j] == modulename) + { + return ((j << 8) | PRIORITY_AFTER); + } + } + return PRIORITY_DONTCARE; +} + +long Server::PriorityBefore(std::string modulename) +{ + for (unsigned int j = 0; j < Config->module_names.size(); j++) + { + if (Config->module_names[j] == modulename) + { + return ((j << 8) | PRIORITY_BEFORE); + } + } + return PRIORITY_DONTCARE; +} + void Server::RehashServer() { WriteOpers("*** Rehashing config file"); |
