|
|
@ -99,26 +99,36 @@ public class VIPService { |
|
|
|
switch (vipGiveMethod){ |
|
|
|
case FREE -> { |
|
|
|
result = permitionService.addFreeVIP(steamID, amount); |
|
|
|
regesterGiveVIP(steamID, amount, vipGiveMethod, extra, false); |
|
|
|
publishWebhook(steamID, amount, "Free", true); |
|
|
|
if (result != 0) { |
|
|
|
regesterGiveVIP(steamID, amount, vipGiveMethod, extra, false); |
|
|
|
publishWebhook(steamID, amount, "Free", true); |
|
|
|
} |
|
|
|
} |
|
|
|
case QIWI -> { |
|
|
|
result = permitionService.addVIP(steamID, amount); |
|
|
|
regesterGiveVIP(steamID, amount, vipGiveMethod, extra, result < 0); |
|
|
|
publishWebhook(steamID, amount, "Qiwi", false); |
|
|
|
if (result != 0) { |
|
|
|
regesterGiveVIP(steamID, amount, vipGiveMethod, extra, result < 0); |
|
|
|
publishWebhook(steamID, amount, "Qiwi", false); |
|
|
|
} |
|
|
|
} |
|
|
|
case STEAM -> { |
|
|
|
result = permitionService.addVIP(steamID, amount); |
|
|
|
regesterGiveVIP(steamID, amount, vipGiveMethod, extra, result < 0); |
|
|
|
publishWebhook(steamID, amount, "Steam", false); |
|
|
|
if (result != 0) { |
|
|
|
regesterGiveVIP(steamID, amount, vipGiveMethod, extra, result < 0); |
|
|
|
publishWebhook(steamID, amount, "Steam", false); |
|
|
|
} |
|
|
|
} |
|
|
|
case MANUAL -> { |
|
|
|
result = permitionService.addVIP(steamID, amount); |
|
|
|
regesterGiveVIP(steamID, amount, vipGiveMethod, extra, result < 0); |
|
|
|
publishWebhook(steamID, amount, "Admin", false); |
|
|
|
if (result != 0) { |
|
|
|
regesterGiveVIP(steamID, amount, vipGiveMethod, extra, result < 0); |
|
|
|
publishWebhook(steamID, amount, "Admin", false); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
serverService.executeRCONOnAllServers("sm_reloadadmins"); |
|
|
|
if (result != 0) { |
|
|
|
serverService.executeRCONOnAllServers("sm_reloadadmins"); |
|
|
|
} |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|