Merge branch 'general-devel' into feature/db-connectionstrings
This commit is contained in:
commit
a6c00d10f4
6 changed files with 57 additions and 28 deletions
|
|
@ -82,7 +82,7 @@ namespace TShockAPI.DB
|
|||
throw new Exception(GetString("Could not find a database library (probably Sqlite3.dll)"));
|
||||
}
|
||||
|
||||
EnsureBansCollection();
|
||||
UpdateBans();
|
||||
TryConvertBans();
|
||||
|
||||
OnBanValidate += BanValidateCheck;
|
||||
|
|
@ -90,14 +90,11 @@ namespace TShockAPI.DB
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ensures the <see cref="_bans"/> collection is ready to use.
|
||||
/// Updates the <see cref="_bans"/> collection from database.
|
||||
/// </summary>
|
||||
private void EnsureBansCollection()
|
||||
public void UpdateBans()
|
||||
{
|
||||
if (_bans == null)
|
||||
{
|
||||
_bans = RetrieveAllBans().ToDictionary(b => b.TicketNumber);
|
||||
}
|
||||
_bans = RetrieveAllBans().ToDictionary(b => b.TicketNumber);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -93,6 +93,37 @@ namespace TShockAPI.DB
|
|||
Permissions.whisper,
|
||||
Permissions.wormhole));
|
||||
|
||||
AddDefaultGroup("insecure-guest", "",
|
||||
string.Join(",",
|
||||
Permissions.canbuild,
|
||||
Permissions.canregister,
|
||||
Permissions.canlogin,
|
||||
Permissions.canpartychat,
|
||||
Permissions.cantalkinthird,
|
||||
Permissions.canchat,
|
||||
Permissions.synclocalarea,
|
||||
Permissions.sendemoji,
|
||||
Permissions.warp,
|
||||
Permissions.summonboss,
|
||||
Permissions.spawnpets,
|
||||
Permissions.worldupgrades,
|
||||
Permissions.startinvasion,
|
||||
Permissions.whisper,
|
||||
Permissions.wormhole,
|
||||
Permissions.canpaint,
|
||||
Permissions.pylon,
|
||||
Permissions.whisper,
|
||||
Permissions.wormhole,
|
||||
Permissions.tppotion,
|
||||
Permissions.magicconch,
|
||||
Permissions.demonconch,
|
||||
Permissions.movenpc,
|
||||
Permissions.worldupgrades,
|
||||
Permissions.rod,
|
||||
Permissions.hurttownnpc,
|
||||
Permissions.startdd2,
|
||||
Permissions.spawnpets));
|
||||
|
||||
AddDefaultGroup("newadmin", "vip",
|
||||
string.Join(",",
|
||||
Permissions.kick,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue