Skip to content

Add isResourceProtected #1253

@xLive

Description

@xLive

Describe the bug

We know you can protect your resources by active protected flag in mtaserver.conf
so admins/mods cannot stop/restart it via stop/restart command,
but you can with stopResource,restartResource functions
so admins/mods can stop it by resources like admin panel or other moderation resources
To reproduce

  1. open admin panel
  2. stop/restart a protected resource

Expected behaviour
stopResource,restartResource
mustn't stop/restart the resource because is protected
Version
MTA:SA Server v1.5.7-release-18957
Additional context
I have two ideas to solve the problem

  1. if the resource is protected stopResource,restartResource functions should return false
    or 2. Add isResourceProtected function to prevent moderation resources from stop/restart protected resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions