RefractorGSCM / Refractor

An open-source game server community manager built with Go.

Home Page:https://refractor.dmas.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

0 being used to represent permanent infractions

dsnidr opened this issue · comments

There are multiple issues with using 0 to represent permanent infractions.

  1. It's the zero value for int values in Go. While this in itself is not necessarily an issue, it would be safer to avoid using a zero value to represent something as significant as a permanent ban or mute.
  2. It breaks infraction synchronization.
  3. 0 minutes won't necessarily mean a permanent duration in all games.

To solve these issues, we should use either a struct wrapper around an int value or a known negative value to represent a permanent infraction duration.