Skip to content

fix(QoL): widen never-logout keypress window to prevent missed idle resets - #531

Open
Joinkiee wants to merge 1 commit into
chsami:mainfrom
Joinkiee:fix/qol-never-logout-margin
Open

fix(QoL): widen never-logout keypress window to prevent missed idle resets#531
Joinkiee wants to merge 1 commit into
chsami:mainfrom
Joinkiee:fix/qol-never-logout-margin

Conversation

@Joinkiee

Copy link
Copy Markdown
Contributor

Problem

QoL's "Never log out" setting intermittently fails to prevent the 5-minute idle logout.

NeverLogoutScript only pressed backspace when min(mouseIdleTicks, keyboardIdleTicks) >= idleTimeout - randomDelay, with randomDelay rolled between 3000–5000 client cycles. Since idle ticks are client cycles (~50/sec) and idleTimeout is ~15000 (5 minutes) on live worlds, the keypress landed at 10000–12000 cycles of idle — only 60–100 seconds before the logout boundary. Because the check runs on GameTick, any stall in tick delivery during that window (world hop, lag spike, busy client thread) let the counter cross 15000 and the player was logged out despite the setting being on.

Fix

Widen randomDelay to 7500–10000, so the keypress lands at ~100–150s of idle time, leaving a 150–200s safety margin before the logout boundary. Bumps QoL version to 1.8.16.

Verification (live client 2.6.19)

Observed via the agent server with a probe plugin sampling getMouseIdleTicks()/getKeyboardIdleTicks():

  • Old logic fired at keyboard-idle 11426 and 10572 cycles (60–100s before logout).
  • Patched logic fired at 5944 and 5600 cycles (~150–200s margin), counter reset each time, session stayed LOGGED_IN throughout.
  • ./gradlew QoLPluginJar -PpluginList=QoLPlugin builds clean.

Note: this only covers the 5-minute idle logout — it cannot prevent the 6-hour force logout or disconnects.

…esets

NeverLogoutScript pressed backspace only when idleness reached
idleTimeout - randomDelay with randomDelay between 3000-5000 client
cycles (~50/sec, idleTimeout ~15000 = 5 min), i.e. just 60-100s before
the logout boundary. A stalled game tick window (world hop, lag, busy
client thread) could push the check past the boundary and log the
player out despite the setting being enabled.

Widen randomDelay to 7500-10000 so the keypress lands at ~100-150s of
idle, leaving a 150-200s safety margin. Verified live against client
2.6.19: old logic observed firing at 10572-11426 idle cycles, patched
logic observed firing at 5600-5944 with the session staying logged in.

Bump QoL version to 1.8.16.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant