Add account create & delete hooks
This commit is contained in:
parent
57029fa0af
commit
91d5fab27d
3 changed files with 72 additions and 1 deletions
4
TShockAPI/DB/UserManager.cs
Normal file → Executable file
4
TShockAPI/DB/UserManager.cs
Normal file → Executable file
|
|
@ -76,6 +76,8 @@ namespace TShockAPI.DB
|
|||
|
||||
if (1 > ret)
|
||||
throw new UserExistsException(user.Name);
|
||||
|
||||
Hooks.AccountHooks.OnAccountCreate(user);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -90,6 +92,8 @@ namespace TShockAPI.DB
|
|||
|
||||
if (affected < 1)
|
||||
throw new UserNotExistException(user.Name);
|
||||
|
||||
Hooks.AccountHooks.OnAccountDelete(user);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue