]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modes/umode_o.cpp
Add user/channel mode synchronisation detection to CAPAB - link will now drop if...
[user/henk/code/inspircd.git] / src / modes / umode_o.cpp
index 7cee7d2382d64f8c452cb1af35cb5d6aa906326e..1eaa30c90a603381dfb8aa8bb99fdbfa59ca45a5 100644 (file)
@@ -24,7 +24,9 @@ ModeUserOperator::ModeUserOperator(InspIRCd* Instance) : ModeHandler(Instance, '
 ModeAction ModeUserOperator::OnModeChange(User* source, User* dest, Channel*, std::string&, bool adding, bool servermode)
 {
        /* Only opers can execute this class at all */
-       if (!IS_OPER(source))
+       if (!ServerInstance->ULine(source->nick.c_str()) &&
+               !ServerInstance->ULine(source->server) &&
+               source->oper.empty())
                return MODEACTION_DENY;
 
        /* Not even opers can GIVE the +o mode, only take it away */