Jump to content

sdbaynham

Members
  • Posts

    4
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

sdbaynham's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. The onLogin hook runs after the user's already been let through all the login checks- I could make sure the whitelist/blacklist is right in onConnect but again, we'd be doing a linear time operation every time a user connects when a hook that lets me boot whoever I want would be constant time, since you don't have the connecting username in onConnect. For other reasons why that's a bad idea, read the thread. EDIT: Also, asking if there's an onLogin hook in a thread where the OP has the phrase "Currently I'm booting the player in the onLogin hook" is, uh.
  2. The system I'm requesting is event-based.
  3. I assume by "a" whitelist/blacklist, you mean "the" whitelist/blacklist, in which case the message the user receives while dead would not be controllable, it'd be, "you can't log into this server" or "you are banned" rather than "you are dead". I wouldn't be able to tell the user how long they have left. I also would have to check the entire death list very frequently to clear living players off it- depending on how large the server is, that's a lot of wasted CPU cycles for something that's constant-time to check on login. It seems like a lot of downsides, especially since there are other systems that might take advantage of similar functionality.
  4. Hey there, I'm trying to write a server-side mod for hardcore servers that will restrict the players' ability to log into the server while dead. Currently I'm booting the player in the onLogin hook on the IConnectionHandler if they attempt to log in while dead. However, I've found that some mods which do more substantive actions during login (TerraFirmaCraft) will crash the client if they're booted at this point. I believe that it's because even if I boot the player, I can't really stop the rest of the login sequence from trying to run unless I throw an exception to stop it. I don't really want to clog up the server logs with stack traces, though. Would it be possible to get a hook added to IConnectionHandler which can be used to restrict players from logging in more safely? Something that'd allow me to return a boot message if the player needs to be kicked or null if they should be let in? Just a thought, thanks!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.