Only inform license owners of new IPs and HWIDs if the license was actually used
This commit is contained in:
@ -171,6 +171,9 @@ public final class LicenseService {
|
||||
}
|
||||
throw new LicenseExpiredException();
|
||||
}
|
||||
try {
|
||||
license.use(hashedIp, hwid); // Use the license
|
||||
repository.save(license); // Save the used license
|
||||
|
||||
// Sending new IP log to the license owner
|
||||
if (newIp && discordService.isLogNewIpsToOwner()) {
|
||||
@ -194,10 +197,8 @@ public final class LicenseService {
|
||||
.addField("HWID", "```" + hwid + "```", false)
|
||||
);
|
||||
}
|
||||
// Use the license
|
||||
try {
|
||||
license.use(hashedIp, hwid);
|
||||
repository.save(license); // Save the used license
|
||||
|
||||
// Logging the license use
|
||||
log.info("License key '{}' for product '{}' was used by {} (HWID: {})", key, product, ip, hwid);
|
||||
return license;
|
||||
} catch (APIException ex) {
|
||||
|
Reference in New Issue
Block a user