Jump to content

LAN Kicking System?


JeffyC
 Share

Recommended Posts

Hi everyone,

We have 0 A.D LAN parties that go on inside our school in our IS and Systems Networking Department, and we want to be able to develop a system that we can use to kick players from the game in the case that they misbehave. We have tried multiple common JavaScript codes, but none have succeeded, does anybody have any methods that we could try that might work?

Link to comment
Share on other sites

Find the switch, Pull their internet plug lol, if its correctly setup in your school, every pc should have a number, as well as a number-label on their networking cables that plug into the switch..

This is what we have been doing for the time being, but we would like to find a more streamlined method of kicking (the people using the computers get pissed when their ethernet cords get unplugged).

Link to comment
Share on other sites

the people using the computers get pissed when their ethernet cords get unplugged

Sounds like they deserve it and have no justification for complaining :P

The networking code currently doesn't provide any way to kick players. I suppose the easiest way to add it (if you have some C++ experience) is to add a new script-callable function to source/gui/scripting/ScriptFunctions.cpp that does "if (g_NetServer) g_NetServer->KickPlayer(playerId)" then add KickPlayer to source/network/NetServer.cpp (you need a CNetServer::KickPlayer that pushes the command onto a new queue in the CNetServerWorker m_Worker object, then CNetServerWorker::RunStep can read the command and find the session associated with that player ID and call session->Disconnect(...)). Then whichever player is hosting can run "Engine.KickPlayer(4)" etc in the in-game console to forcibly disconnect a player.

For it to be a more robust solution, it would have to stop the player from immediately reconnecting, and some kind of GUI interface would be nice, but those probably aren't critical features. I'd be happy to add a basic solution to the source if someone writes a patch for it :)

Link to comment
Share on other sites

  • 1 month later...

Sounds like they deserve it and have no justification for complaining :P

The networking code currently doesn't provide any way to kick players. I suppose the easiest way to add it (if you have some C++ experience) is to add a new script-callable function to source/gui/scripting/ScriptFunctions.cpp that does "if (g_NetServer) g_NetServer->KickPlayer(playerId)" then add KickPlayer to source/network/NetServer.cpp (you need a CNetServer::KickPlayer that pushes the command onto a new queue in the CNetServerWorker m_Worker object, then CNetServerWorker::RunStep can read the command and find the session associated with that player ID and call session->Disconnect(...)). Then whichever player is hosting can run "Engine.KickPlayer(4)" etc in the in-game console to forcibly disconnect a player.

For it to be a more robust solution, it would have to stop the player from immediately reconnecting, and some kind of GUI interface would be nice, but those probably aren't critical features. I'd be happy to add a basic solution to the source if someone writes a patch for it :)

So just because they discussed things that this admin doesn't like, because he disagrees with the opinions of the players, they should be punished?

I'm supprised that none have come and beaten the admin down for unplugging the ethernet. He needs to be shown ideas...

Link to comment
Share on other sites

I'm a little surprised as well. In most communities the problem is that players leave before the game is over and ruin it for other players especially when in teams.

To ensure high gaming quality in public servers the only decent working mechanisms are whitelists and votekicks with all other players agreeing.

And even then players will sometimes be kicked without a serious reason...

I can't understand this...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

 Share

×
×
  • Create New...