def handle_mode(irc, source, command, args):
    """Protect against forced deoper attempts."""
    target = args['target']
    modes = args['modes']
    if irc.is_internal_client(target) and not irc.is_internal_client(source):
        if ('-o', None) in modes and (target == irc.pseudoclient.uid or not
            irc.is_manipulatable_client(target)):
            irc.mode(irc.sid, target, {('+o', None)})
