matt1484 / bl3_auto_vip

Borderlands3 Auto VIP/Shift Code Redemption System
Apache License 2.0
81 stars 19 forks source link

Add expired SHIFT codes to the redeemed codes array #26

Closed squatto closed 5 years ago

squatto commented 5 years ago

When a SHIFT code redemption is attempted, it was added to the redeemed codes array if it was redeemed or if the response was "code already redeemed". This PR adds a check for the response "code has expired" and adds the code to the redeemed codes array. This prevents it from being attempted again.

This is especially useful when looked at in combination with my other PR #25, which adds an -allow-inactive option. If you provide only an email, password, and -allow-inactive, all of the expired codes on the Orcz.com list are attempted. This PR makes sure that they're only attempted once and then marked as redeemed.