Skip to content
This repository was archived by the owner on Apr 27, 2019. It is now read-only.

Commit 18f9836

Browse files
committed
Disallows a user from promoting/demoting a user of the same or greater rank in admin_command_plugin.promote()
1 parent 01e2fbe commit 18f9836

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

plugins/admin_commands_plugin/admin_command_plugin.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ def promote(self, data):
7171
player = self.player_manager.get_by_name(name)
7272
if player is not None:
7373
old_rank = player.access_level
74+
if old_rank >= self.protocol.player.access_level:
75+
self.protocol.send_chat_message("You cannot change that user's access level as they are at least at an equal level as you.")
76+
return
7477
if rank == "admin":
7578
self.make_admin(player)
7679
elif rank == "moderator":

0 commit comments

Comments
 (0)