Pryaxis / TShock

☕️⚡️TShock provides Terraria servers with server-side characters, anti-cheat, and community management tools.
GNU General Public License v3.0
2.43k stars 382 forks source link

Connections per IP? #1577

Closed hakusaro closed 6 years ago

hakusaro commented 6 years ago

Okay, there's this commented out chunk of code in TShock right now, related to CLI parsing:

"-connperip": Todo - Requires an OTAPI modification
{
  int limit;
  if (int.TryParse(parms[++i], out limit))
  {
    //Netplay.MaxConnections = limit;
    //ServerApi.LogWriter.PluginWriteLine(this, string.Format(
    //  "Connections per IP have been limited to {0} connections.", limit), TraceLevel.Verbose);
    ServerApi.LogWriter.PluginWriteLine(this, "\"-connperip\" is not supported in this version of TShock.", TraceLevel.Verbose);
  }
  else
    ServerApi.LogWriter.PluginWriteLine(this, "Invalid value given for command line argument \"-connperip\".", TraceLevel.Warning);
}
  1. Does this still require an OTAPI modification @DeathCradle?
  2. Does this still need to be in TShock @Pryaxis/tshock?
  3. Should this be fixed and implemented or do we care, @Pryaxis/tshock?
SignatureBeef commented 6 years ago

Netplay.MaxConnections is a constant these days, so either some kind of modification will be required, or another mechanism entirely.

Or simply use a plugin: https://tshock.co/xf/index.php?resources/connection-limit.205/