Jump to content

Closing a player socket / forcing it to time out


J15t98J

Recommended Posts

So.

 

I'm currently writing a Bukkit plugin which allows moderators to ban someone with a slightly different command, so that instead of seeing a ban message when they log in, the server closes / times out the socket they are connecting on, so they just see a connection error and don't suspect anything.

 

However, Bukkit's API doesn't have the ability to close sockets / force them to time out, as far as I can tell. Is there a way to accomplish this with Forge, and if so, how? I know it's a slightly odd request, any help appreciated :)

Link to comment
Share on other sites

What I would try to do (probably won't work) is make it so that it checks to see if the player is on a special ban list (that you create, e.g. specialban.txt or whatever) and if the player is on that list, then don't connect, display the connection error GUI or something similar.

I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes.

 

I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there xD

Link to comment
Share on other sites

Mew, I've already got that set up, and just need a way to kick the player without it saying "Disconnected by Server" at the top. Also, displaying the connection error GUI is client side, so I'd have to send a packet (if there is one); otherwise I would have to mod the client, which I don't want to do :/

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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