Skip to content

Ban list viewer - pzctl can ban but cannot show existing bans #88

Description

@cagatay-softgineer

Depends on #87. From the pz-admin survey.

The gap

moderation.py can issue banuser, banid, banip and their reversals. It cannot show you a single existing ban.

That means today an admin can ban someone and then have no way, through pzctl, to answer:

  • who is currently banned?
  • why - what reason was recorded?
  • who banned them, and when?
  • is this appeal about a ban that still exists?

Unbanning currently requires already knowing the exact name, SteamID or IP. If you don't have it written down elsewhere, pzctl cannot help you find it.

What makes it possible

#87 establishes read-only access to ~/Zomboid/db/<servername>.db, which has (verified on a real install):

bannedid   (steamid, reason)
bannedip   (ip, username, reason)
userlog    (id, username, type, text, issuedBy, amount, lastUpdate)

bannedid/bannedip are the ban lists themselves. userlog carries who issued the action and when - issuedBy and lastUpdate - which is exactly the audit trail #2 built a parallel version of.

Scope

  • Ban list view in the panel: name, SteamID, IP, reason, issuer, date
  • Unban directly from a row, so the identifier never has to be retyped - this is where transcription errors currently cause the wrong person to be unbanned
  • Reconcile with the reason log from Kick/ban/unban UI with reason log #2: prefer the game's userlog as the source of truth and treat pzctl's own log as a supplement, rather than showing two disagreeing histories
  • Search by partial name/SteamID/IP

Verify first

  • Whether name-based bans (banuser) land in bannedid, bannedip, or somewhere else entirely - all three ban tables were empty on the install inspected, so the mapping from command to table is unconfirmed. Issue each of the three ban types against a test server and observe which rows appear before designing the view.
  • What the type values in userlog are, and whether unbans are recorded there too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions