Merge pull request #1544 from Patrikkk/general-devel
Add missing "if handled - return" code to OnNameCollision.
This commit is contained in:
commit
135826f15d
2 changed files with 6 additions and 0 deletions
|
|
@ -3,6 +3,7 @@
|
|||
This is the rolling changelog for TShock for Terraria. Use past tense when adding new entries; sign your name off when you add or change something. This should primarily be things like user changes, not necessarily codebase changes unless it's really relevant or large.
|
||||
|
||||
## Upcoming Changes
|
||||
* API: Added return in OnNameCollision if hook has been handled. (@Patrikkk)
|
||||
* API: Added hooks for item, projectile and tile bans (@deadsurgeon42)
|
||||
* API: Changed `PlayerHooks` permission hook mechanisms to allow negation from hooks (@deadsurgeon42)
|
||||
* API: New WorldGrassSpread hook which shold allow corruption/crimson/hallow creep config options to work (@DeathCradle)
|
||||
|
|
|
|||
|
|
@ -522,6 +522,11 @@ namespace TShockAPI
|
|||
/// <param name="args">args - The NameCollisionEventArgs object.</param>
|
||||
private void NetHooks_NameCollision(NameCollisionEventArgs args)
|
||||
{
|
||||
if (args.Handled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
string ip = Utils.GetRealIP(Netplay.Clients[args.Who].Socket.GetRemoteAddress().ToString());
|
||||
|
||||
var player = Players.First(p => p != null && p.Name == args.Name && p.Index != args.Who);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue