diff --git a/main.go b/main.go index f44bad6..3d52f05 100644 --- a/main.go +++ b/main.go @@ -587,6 +587,10 @@ func resetCommandHandler(client *discordgo.Session, i *discordgo.InteractionCrea } } + for _, uid := range userUIDs { + log.Printf("Reset the HWID of user with UID %d for %s", uid, softwareType) + } + err = client.InteractionRespond(i.Interaction, &discordgo.InteractionResponse{ Type: discordgo.InteractionResponseChannelMessageWithSource, Data: &discordgo.InteractionResponseData{ @@ -681,8 +685,6 @@ func resetHWID(tableName string, uids []int) { } func resetAndVerify(tableName string, uids []int) ([]bool, []error) { - var beforeHashes []string - var afterHashes []string var successes []bool var errorsSlice []error @@ -706,10 +708,6 @@ func resetAndVerify(tableName string, uids []int) ([]bool, []error) { beforeHashesMap[uid] = beforeHash } - for _, uid := range uids { - beforeHashes = append(beforeHashes, beforeHashesMap[uid]) - } - resetHWID(tableName, uids) rows, err = db.Query(fmt.Sprintf(`SELECT "UID", MD5(CONCAT("StorageIdentifier", "BootIdentifier")) FROM public.%q WHERE "UID" = ANY($1)`, tableName), pq.Array(uids)) @@ -739,7 +737,6 @@ func resetAndVerify(tableName string, uids []int) ([]bool, []error) { successes = append(successes, false) continue } - afterHashes = append(afterHashes, afterHash) successes = append(successes, beforeHashesMap[uid] != afterHash || afterHash == "d41d8cd98f00b204e9800998ecf8427e") }