mirror of
https://github.com/edgegamers/Gangs.git
synced 2025-12-05 20:40:30 -08:00
Invite Command Fix
Fixed cannot cancel gang invite when [invite] capacity is full bug by putting the cancel check before the capacity check
This commit is contained in:
@@ -37,6 +37,13 @@ public class InviteCommand(IServiceProvider provider)
|
||||
|
||||
if (!perms.Permissions.HasFlag(Perm.INVITE_OTHERS))
|
||||
return await handleNoPermission(player, info);
|
||||
|
||||
var invites =
|
||||
await GangStats.GetForGang<InvitationData>(player.GangId.Value,
|
||||
gangInviteId) ?? new InvitationData();
|
||||
|
||||
if (info[1].Equals("cancel", StringComparison.OrdinalIgnoreCase))
|
||||
return await handleCancelInvite(info, player, invites);
|
||||
|
||||
var capacityPerk = Provider.GetService<ICapacityPerk>();
|
||||
if (capacityPerk != null) {
|
||||
@@ -50,13 +57,6 @@ public class InviteCommand(IServiceProvider provider)
|
||||
}
|
||||
}
|
||||
|
||||
var invites =
|
||||
await GangStats.GetForGang<InvitationData>(player.GangId.Value,
|
||||
gangInviteId) ?? new InvitationData();
|
||||
|
||||
if (info[1].Equals("cancel", StringComparison.OrdinalIgnoreCase))
|
||||
return await handleCancelInvite(info, player, invites);
|
||||
|
||||
return await handleInvite(executor, player, info, invites);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user