JeffyC Posted February 18, 2012 Report Share Posted February 18, 2012 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? Quote Link to comment Share on other sites More sharing options...
Kazu Kun Posted February 18, 2012 Report Share Posted February 18, 2012 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.. Quote Link to comment Share on other sites More sharing options...
JeffyC Posted February 18, 2012 Author Report Share Posted February 18, 2012 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). Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted February 19, 2012 Report Share Posted February 19, 2012 the people using the computers get pissed when their ethernet cords get unpluggedSounds like they deserve it and have no justification for complaining 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 Quote Link to comment Share on other sites More sharing options...
nocompile Posted March 20, 2012 Report Share Posted March 20, 2012 Sounds like they deserve it and have no justification for complaining 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... Quote Link to comment Share on other sites More sharing options...
FeXoR Posted March 20, 2012 Report Share Posted March 20, 2012 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... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.