funkemunky / AntiVPN

An antivpn utilizing the funkemunky API
Apache License 2.0
21 stars 7 forks source link

Add null checks to ip check on login #43

Closed C0D3-M4513R closed 10 months ago

C0D3-M4513R commented 10 months ago

Supersedes: #41 (and here for github once again) Closes: #41 Fixes: #39

Blocked on: #42 (cause that fixes the compilation)

I specifically chose to add a new block there, so the new variable would be scoped to the bare minimum lifetime (been coding rust a lot recently). Also I deliberately chose not to invoke event.getPlayer().getAddress() and address.getAddress() twice, just in case something changed between function calls when it shouldn't.

C0D3-M4513R commented 10 months ago

Seems like github doesn't allow a pr to close another pr on merge...