Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added 4 new permissions #329

Closed
wants to merge 4 commits into from
Closed

Added 4 new permissions #329

wants to merge 4 commits into from

Conversation

EPuncker
Copy link
Contributor

@@ -13503,7 +13503,10 @@ void clif_parse_GMKick(int fd, struct map_session_data *sd) {
}
sprintf(command, "/kick %s (%d)", status->get_name(target), status->get_class(target));
logs->atcommand(sd, command);
status_percent_damage(&sd->bl, target, 100, 0, true); // can invalidate 'target'
if(pc_has_permission(sd,PC_PERM_DISABLE_DROPS))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Umm, are you sure about this one? It doesn't really seem to match the description, this only affects /kick (and even so, I'm not sure this would be the right way, since you're just removing the src parameter from the status_percent_change call, which most likely has have some side-effects). And what about the monsters killed by this player by normal means? I don't think I see code that disables those drops?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed the description is wrong, this permission was really intended to work only with /kick since the rest can be done with the no player vs monster flag

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then this looks redundant to me. Just like you can use the no player vs monster flag to block other ways of killing a monster, then you can also use the @killmonster atcommand permissions to block the right-click /kick, can't you?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disabling @killmonster atcommand disables the right-click feature?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what I read here, yes. According to the function header, this is invoked for both the right-click "kick" command and the /kick command, and if you check line 13500, it verified whether pc->can_use_command(sd, "@killmonster"), in case of right-click on a monster to kill it.
In case of right click on a player to kick it offline, it uses atcommand @kick (inheriting all of its permissions) and in case of right click on an NPC to unload it, it checks for @unloadnpc permissions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, then I'll remove this one, thanks!

@EPuncker EPuncker changed the title Added 5 new permissions Added 4 new permissions Sep 21, 2014
@EPuncker EPuncker closed this Sep 21, 2014
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.

None yet

3 participants