Fix NetHooks_NameCollision to kick duplicate players.
- Fixes Pryaxis/TShock#2530
This commit is contained in:
parent
227cef3bd6
commit
8b064a7e22
2 changed files with 4 additions and 3 deletions
|
|
@ -521,7 +521,7 @@ namespace TShockAPI
|
|||
{
|
||||
if (player.IP == ip)
|
||||
{
|
||||
Netplay.Clients[player.Index].PendingTermination = true;
|
||||
player.Kick("You logged in from the same IP.", true, true, "Server", true);
|
||||
args.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
|
@ -530,7 +530,7 @@ namespace TShockAPI
|
|||
var ips = JsonConvert.DeserializeObject<List<string>>(player.Account.KnownIps);
|
||||
if (ips.Contains(ip))
|
||||
{
|
||||
Netplay.Clients[player.Index].PendingTermination = true;
|
||||
player.Kick("You logged in from another location.", true, true, "Server", true);
|
||||
args.Handled = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -1279,7 +1279,7 @@ namespace TShockAPI
|
|||
|
||||
//Reset toggle creative powers to default, preventing potential power transfer & desync on another user occupying this slot later.
|
||||
|
||||
foreach(var kv in CreativePowerManager.Instance._powersById)
|
||||
foreach (var kv in CreativePowerManager.Instance._powersById)
|
||||
{
|
||||
var power = kv.Value;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue