X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules.cpp;h=8061248d24b89d60b961e97fb25051b588fe4761;hb=985c2bd1e6ea0bba467143406b83ba4a9f77fce1;hp=9c608cb823493cc50138e6961fa5e025fc344c17;hpb=20b31c2b688086abf5891879d73f0c6194f52392;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules.cpp b/src/modules.cpp index 9c608cb82..8061248d2 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -11,7 +11,7 @@ * --------------------------------------------------- */ -/* $Core: libIRCDmodules */ +/* $Core */ #include "inspircd.h" #include "wildcard.h" @@ -111,7 +111,7 @@ void Module::OnUserQuit(User*, const std::string&, const std::string&) { } void Module::OnUserDisconnect(User*) { } void Module::OnUserJoin(User*, Channel*, bool, bool&) { } void Module::OnPostJoin(User*, Channel*) { } -void Module::OnUserPart(User*, Channel*, const std::string&, bool&) { } +void Module::OnUserPart(User*, Channel*, std::string&, bool&) { } void Module::OnRehash(User*, const std::string&) { } void Module::OnServerRaw(std::string&, bool, User*) { } int Module::OnUserPreJoin(User*, Channel*, const char*, std::string&, const std::string&) { return 0; } @@ -143,6 +143,8 @@ int Module::OnCheckInvite(User*, Channel*) { return 0; } int Module::OnCheckKey(User*, Channel*, const std::string&) { return 0; } int Module::OnCheckLimit(User*, Channel*) { return 0; } int Module::OnCheckBan(User*, Channel*) { return 0; } +int Module::OnCheckExtBan(User *, Channel *, char) { return 0; } +int Module::OnCheckStringExtBan(const std::string &s, Channel *c, char type) { return 0; } int Module::OnStats(char, User*, string_list&) { return 0; } int Module::OnChangeLocalUserHost(User*, const std::string&) { return 0; } int Module::OnChangeLocalUserGECOS(User*, const std::string&) { return 0; } @@ -335,10 +337,17 @@ bool ModuleManager::SetPriority(Module* mod, Implementation i, PriorityState s, { /* Suggestion from Phoenix, "shuffle" the modules to better retain call order */ int incrmnt = 1; + if (source > swap_pos) incrmnt = -1; + for (unsigned int j = source; j != swap_pos; j += incrmnt) + { + if (( j + incrmnt > EventHandlers[i].size() - 1) || (j + incrmnt < 0)) + continue; + std::swap(EventHandlers[i][j], EventHandlers[i][j+incrmnt]); + } } return true;