Skip to content

Commit

Permalink
Server/faction perm check fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dssecret committed Nov 15, 2023
1 parent 3113a6f commit 41496d3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion controllers/api/faction/positions.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def get_positions(*args, **kwargs):
except DoesNotExist:
return make_exception_response("1102", key)

if faction.guild != guild_id:
if faction.guild_id != guild_id:
return make_exception_response("1102", key)
else:
faction: Faction = kwargs["user"].faction
Expand Down
4 changes: 2 additions & 2 deletions skynet/commands/faction/cancel.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def cancel_command(interaction, *args, **kwargs):
"flags": 64,
},
}
elif user.faction.tid not in guild.factions or user.faction.guild != guild.sid:
elif user.faction.tid not in guild.factions or user.faction.guild_id != guild.sid:
return {
"type": 4,
"data": {
Expand Down Expand Up @@ -467,7 +467,7 @@ def cancel_button(interaction, *args, **kwargs):
"flags": 64,
},
}
elif user.faction.tid not in guild.factions or user.faction.guild != guild.sid:
elif user.faction.tid not in guild.factions or user.faction.guild_id != guild.sid:
return {
"type": 4,
"data": {
Expand Down
4 changes: 2 additions & 2 deletions skynet/commands/faction/fulfill.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def fulfill_command(interaction, *args, **kwargs):
"flags": 64,
},
}
elif user.faction.tid not in guild.factions or user.faction.guild != guild.sid:
elif user.faction.tid not in guild.factions or user.faction.guild_id != guild.sid:
return {
"type": 4,
"data": {
Expand Down Expand Up @@ -480,7 +480,7 @@ def fulfill_button(interaction, *args, **kwargs):
"flags": 64,
},
}
elif user.faction.tid not in guild.factions or user.faction.guild != guild.sid:
elif user.faction.tid not in guild.factions or user.faction.guild_id != guild.sid:
return {
"type": 4,
"data": {
Expand Down
2 changes: 1 addition & 1 deletion skynet/commands/faction/withdraw.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def withdraw(interaction, *args, **kwargs):
"flags": 64,
},
}
elif user.faction.tid not in guild.factions or user.faction.guild != guild.sid:
elif user.faction.tid not in guild.factions or user.faction.guild_id != guild.sid:
return {
"type": 4,
"data": {
Expand Down

0 comments on commit 41496d3

Please sign in to comment.