Skip to content
SynacNipo edited this page Aug 2, 2026 · 2 revisions

Voting

!restartvm and !revertvm are vote-gated in chat so a single viewer can't nuke the stream. So is !voteban <author> - chat can shadowban a toxic chatter, same mechanism.

How it works

  • A command needs N distinct chatters to request it within 60 seconds.
  • Default threshold: 2. Configurable in src/settings.json:
"voting": {
  "revertVMVoteThreshold": 2,
  "restartVMVoteThreshold": 2,
  "votebanVoteThreshold": 2,
  "votebanDurationSeconds": 300
}
  • Votes accumulate across the whole 60 s window (people don't have to vote simultaneously).
  • Each chatter gets one vote per window - duplicates are ignored.
  • Chat shows progress: @alice started !revert, vote 1/2 then @bob voted !revert, vote 2/2.
  • When the threshold is reached the command executes through the same serialized queue as everything else.
  • From the CLI prompt the commands run immediately (you're the operator).

!voteban

When the threshold is met, the target is shadowbanned: their messages are hidden from the chat log and their commands never execute, for votebanDurationSeconds (default 300 s / 5 minutes):

✓ @spammer is shadowbanned for 300s - will expire in 300s

While banned, if they post anything the operator sees only:

WARN @spammer is shadowbanned - will expire in 245s

The banned user sees nothing - that's the "shadow" part. Operators can also ban directly at the CLI prompt with !voteban <author>.

Cooldown

After either command executes, both are blocked for 15 seconds (shared cooldown - a revert right after a restart is just as disruptive):

ERR Failed : "!revertvm": !revertvm is on cooldown - retry in 12s

Restart vs revert

!restartvm !revertvm
What Hard reset (controlvm reset - like the reset button) Snapshot restore
Clean shutdown No - guest just reboots Yes - ACPI shutdown first
Works when guest is hung Yes Mostly - needs a poweroff
Time ~5 s ~2 min
Result Same OS state, rebooted Back to the snapshot state

Safety tip

Keep a flat snapshot tree - one current snapshot, recreated whenever you change the VM (see Snapshots). Then !revertvm always restores a known-good state, and old diffs aren't piling up on disk.

Clone this wiki locally