Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Votekick feature #8

Open
Brickcaster opened this issue May 26, 2017 · 16 comments
Open

Votekick feature #8

Brickcaster opened this issue May 26, 2017 · 16 comments

Comments

@Brickcaster
Copy link
Contributor

Brickcaster commented May 26, 2017

I propose writing a /votekick (player) (reason) command so non-admins have the ability to handle griefers

I would like some feedback to make sure I implement this properly to avoid potential abuse.

Basic features:

  • Victims of the votekick are moved to game.surface["jail"]
  • Victims of the votekick are put in a special permissions group with console permission revoked (to prevent flaming), train permissions revoked, and technology changing permissions revoked.
  • "jail" surface is limited in size to prevent save file inflation.
  • Players must meet a minimum player.online_time threshhold before they can vote (optional: higher threshhold to start a /votekick)
  • Votekick voting lasts for 2 minutes. 25% of online players must agree (or 2, whichever number is greater)
  • Votekicks are logged via game.write_file()

Do I dump target player inventory too?
Do other permissions need to be revoked?
Should I add any other limitations on who can call a votekick?

Edit: Added additional permissions limitations

@IBlackI
Copy link
Member

IBlackI commented May 26, 2017 via email

@Brickcaster
Copy link
Contributor Author

That's a good idea. Either it can be added to their gui, written onto the surface, added as a map tag, or all of the above.

@viceroypenguin
Copy link
Contributor

I would say yes, drop a chest (or two) with all their inventory. And further, we should update the fmmo ban/kick to do the same thing. I know @IBlackI has done a kick command already, so we should add it there too. Maybe a common save_inventory() function in utils and then all three could use that.

@viceroypenguin
Copy link
Contributor

Also, if any admins are online, /votekick is disabled.

@Brickcaster
Copy link
Contributor Author

I don't think an inventory drop on a normal kick is necessary as /open exists. I'm mostly concerned about cases where a player might hog all of the u-235 or level 3 modules or if PA mk2s are automated, several of those. So a very specific case of griefing that admins can usually deal with separately.

Besides, there's no on_player_kicked event or player.is_banned flag in the API.

@viceroypenguin
Copy link
Contributor

I agree, I don't believe there's a hook in the API for that. Which is why a separate command has been created for fmmo warns and bans, which would allow us to have our own code for this. We started this process so that we could eventually print the warns and bans out for the running agent to read and process, so bans and warns could be done automatically with the banlist.

@IBlackI
Copy link
Member

IBlackI commented May 26, 2017

https://aerith.ovh/factoriommo/banlist/api/is_banned.php?nickname=I_IBlackI_I
This can be used to check bans atleast. You could have the ingame print something to log which would start up a piece of code to check and then run the commands in factorio.

@viceroypenguin
Copy link
Contributor

oooh... there's another idea for the agent. If a votekick is requested, check the banlist for a warn, and if it's a warn then automatically ban from current game and add to warn list a second time. This would not allow too much abuse, because admin is required to add to the banlist the first time, etc.

@IBlackI
Copy link
Member

IBlackI commented May 26, 2017

Feels like we are waiting on the agent again. :-(. Also we could put the players on a different force so they won't even be able to read chat. (Unless someone shouts)

@viceroypenguin
Copy link
Contributor

Yeah, I've been busy this past couple weeks, but I'm going to start on a new version of the agent this weekend. What do you mean "read chat"? Agent should be doing silent commands to the server, and prints to the agent should be silent already anyway.

@IBlackI
Copy link
Member

IBlackI commented May 26, 2017

I meant the players who are on the surface "jail". If you put them on a different force they will not be able to read the chat from regular players. (except for when a player shouts)

@viceroypenguin
Copy link
Contributor

Oh, yeah. Agreed.

@Brickcaster
Copy link
Contributor Author

Brickcaster commented Feb 22, 2018

I've had this module for a while but I've never properly gotten a group assembled to test it: https://github.com/Brickcaster/factoriorpg/blob/oarc-scenario/modules/votekick.lua

Players in the wild are reporting that it doesn't work as intended but I don't see the error.

@psihius
Copy link
Member

psihius commented Mar 2, 2018

I'd say this module needs a GUI button.

Most of the time even we are gonna forget that the command is there (and we usually kick/ban people via our admin power, not a votekick module), users are not gonna notice or just forget about it in minutes.
So I'd say a button is needed that displays the text of what to do to kick a user (info screen basically with instructions, since making an input box with nickname autocomplete might be impossible or just to much effort).

@Brickcaster
Copy link
Contributor Author

I saw a neat feature on Explosive Gaming's server where each player had a flag next to their name. The flag function as a report button to report bad behavior! I think that would be a nice feature, and it doesn't take an extra spot on the GUI aside from the spot the player list already takes up.

@IBlackI
Copy link
Member

IBlackI commented Mar 2, 2018

Playerlist is currently an admin only thing (modular_admin_players) so that wouldn't work for reporting. An playerlist could however be added to modular_information with this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants