diff options
-rw-r--r-- | src/modules/m_override.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp index 3131ab4b2..c443a88d8 100644 --- a/src/modules/m_override.cpp +++ b/src/modules/m_override.cpp @@ -87,14 +87,12 @@ class ModuleOverride : public Module ModResult OnPreMode(User* source,User* dest,Channel* channel, const std::vector<std::string>& parameters) { - if (!IS_OPER(source)) - return MOD_RES_PASSTHRU; if (!source || !channel) return MOD_RES_PASSTHRU; + if (!IS_OPER(source) || !IS_LOCAL(source)) + return MOD_RES_PASSTHRU; - unsigned int mode = 0; - if (channel->HasUser(source)) - mode = channel->GetPrefixValue(source); + unsigned int mode = channel->GetPrefixValue(source); if (mode < HALFOP_VALUE && CanOverride(source, "MODE")) { |