9 Commits

Author SHA1 Message Date
Aaron Suen
906cf51cbb Trying to fix some issues
- In some cases, players are not being kicked, even though their
  status clearly indicates they should be.  Make sure the "should we
  kick them" logic in the status check command matches the logic in
  the thing that actually does the kick.
- Clean up the way we handle event hooks to reduce the code mess.
- Don't rely on the bump/bumpn functions returning pname; always
  return nil with them and determine pname at the outer layers and
  pass it in as necessary.  This is how we should have fixed the
  earlier bug that caused players digging things not to get the node.
2022-10-06 06:42:06 -04:00
Aaron Suen
52d9932173 Add debug command for szutil_idlekick 2022-10-05 07:47:21 -04:00
Aaron Suen
3ea73b50b5 Fix idlekick never kicking players 2022-10-04 21:35:20 -04:00
Aaron Suen
9e9cd6ca48 Ignore constantly-held controls too
Things like auto-forward or a taped down mining key also count
as "idle" for this system's purposes as well, to avoid players
trivially exploiting to avoid being kicked, or to prevent
false positives caused by stuck controls.
2022-10-04 18:38:17 -04:00
Aaron Suen
fa5ba739cf Ignore very small lookdir movements 2022-10-04 18:35:44 -04:00
Aaron Suen
079c21a58b Don't return player name on craft in idlekick
Apparently this causes games that use engine crafting to replace
the recipe output with an unknown item with the player's name.

Fixes https://gitlab.com/sztest/szutilpack/-/issues/4
2022-07-05 06:44:31 -04:00
Aaron Suen
cf489835cf Fix code formatting issue 2022-04-18 23:46:45 -04:00
Aaron Suen
9af45a5bab Fix infinite node placement bug 2021-08-19 07:39:07 -04:00
Aaron Suen
a1afdabdb6 Mod to kick idle players 2021-08-18 08:08:25 -04:00