Skip to content

Patch GetAdmImmunity logic in Comms plugin#515

Merged
Groruk merged 2 commits intosbpp:v1.xfrom
CrazyHackGUT:patch-getadmimmunity
Oct 5, 2018
Merged

Patch GetAdmImmunity logic in Comms plugin#515
Groruk merged 2 commits intosbpp:v1.xfrom
CrazyHackGUT:patch-getadmimmunity

Conversation

@CrazyHackGUT
Copy link
Contributor

@CrazyHackGUT CrazyHackGUT commented Sep 23, 2018

Description

GetAdmImmunity() doesn't respects immunity from admin groups.
If admin has group with immunity 100 and personal 0, this function always returns 0.
This patch corrects this logic.

Motivation and Context

SourceComms from the very beginning of development has a bug: if admin-issuer doesn't have personal immunity, any admin can remove him punishments on any player from this admin before player reconnects.
This occurs because when player connects, SQL query respects group immunity. But when admin issue a mute, plugin relies on GetAdmImmunity() function (which is don't respects group immunity).

How Has This Been Tested?

I asked another administrator (with full access to web) downgrade my group from SuperAdmin (immunity 1500) to BaseAdmin (immunity 10), and issue mute for me. After receiving mute, i tried remove punishment, and failed.

Screenshots (if appropriate):

(sorry, i don't have screenshots with english localization)
default

[SourceComms++] Totally Not FeedBlack: Issued an extended mute on CrazyHackGUT for 1 minutes (reason: test).
[SourceComms++] The mute on CrazyHackGUT was unable to be removed due to being muted by a higher administrator!

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.

@Groruk Groruk merged commit d60297a into sbpp:v1.x Oct 5, 2018
@CrazyHackGUT CrazyHackGUT deleted the patch-getadmimmunity branch October 5, 2018 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants