From aa7c9b11941642dd2e114b09d95b7dc3a91147ea Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Thu, 11 Apr 2019 17:27:30 +0100 Subject: [PATCH] Fixed assign and unassign --- config/roles.lua | 4 ++-- modules/commands/roles.lua | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/roles.lua b/config/roles.lua index f0dfa9f7..29c0017b 100644 --- a/config/roles.lua +++ b/config/roles.lua @@ -120,7 +120,7 @@ Roles.new_role('Veteran','Vet') :allow{ } :set_auto_promote_condition(function(player) - if player.online_time > 3*hours then + if player.online_time > 10*hours then return true end end) @@ -141,7 +141,7 @@ Roles.new_role('Regular','Reg') 'command/kill' } :set_auto_promote_condition(function(player) - if player.online_time > 10*hours then + if player.online_time > 3*hours then return true end end) diff --git a/modules/commands/roles.lua b/modules/commands/roles.lua index 4501a822..278f6c10 100644 --- a/modules/commands/roles.lua +++ b/modules/commands/roles.lua @@ -8,7 +8,7 @@ Commands.new_command('assign-role','Assigns a role to a player') :set_flag('admin-only',true) :add_alias('rpromote','assign','role','add-role') :register(function(player,action_player,role,raw) - local player_highest = Roles.get_player_highest(player) + local player_highest = Roles.get_player_highest_role(player) if player_highest.index < role.index then Roles.assign_player(action_player,role,player.name) else @@ -22,7 +22,7 @@ Commands.new_command('unassign-role','Unassigns a role from a player') :set_flag('admin-only',true) :add_alias('rdemote','unassign','remove-role') :register(function(player,action_player,role,raw) - local player_highest = Roles.get_player_highest(player) + local player_highest = Roles.get_player_highest_role(player) if player_highest.index < role.index then Roles.unassign_player(action_player,role,player.name) else