Light Style© by Fisana

Jump to content


Photo

LAN Kicking System?


  • Please log in to reply
5 replies to this topic

#1 JeffyC

JeffyC

    Tiro

  • Community Newbie
  • 2 posts

Posted 18 February 2012 - 05:35 PM

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?
  • 0

#2 Kazu Kun

Kazu Kun

    Discens

  • Community Members
  • Pip
  • 79 posts

Posted 18 February 2012 - 05:40 PM

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..
  • 0
Reality?
No..
AnIMaTE LiFE

[system]
Spoiler

#3 JeffyC

JeffyC

    Tiro

  • Community Newbie
  • 2 posts

Posted 18 February 2012 - 11:25 PM

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).
  • 0

#4 Ykkrosh

Ykkrosh

    Primus Pilus

  • WFG Programming Team
  • 4,908 posts

Posted 19 February 2012 - 03:19 PM

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 :)
  • 0
Philip Taylor [aka Ykkrosh]

Wildfire Games Programmer
Contact me: philip@wildfiregames.com

#5 nocompile

nocompile

    a.k.a trajans_advisor

  • Community Members
  • Pip
  • 73 posts

Posted 20 March 2012 - 09:19 PM

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...
  • 0

#6 FeXoR

FeXoR

    Centurio

  • Community Members
  • PipPipPipPipPip
  • 862 posts

Posted 20 March 2012 - 10:20 PM

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...


  • 0