Added reader closing (if it will help) and returns default group rather than "null"
This commit is contained in:
parent
c090d9a9f6
commit
30d0d48386
8 changed files with 37 additions and 13 deletions
|
|
@ -312,6 +312,7 @@ namespace TShockAPI
|
|||
if (!player.Group.HasPermission("usebanneditem"))
|
||||
{
|
||||
var inv = player.TPlayer.inventory;
|
||||
|
||||
for (int i = 0; i < inv.Length; i++)
|
||||
{
|
||||
if (inv[i] != null && TShock.Itembans.ItemIsBanned(inv[i].name))
|
||||
|
|
@ -328,6 +329,7 @@ namespace TShockAPI
|
|||
private void OnJoin(int ply, HandledEventArgs handler)
|
||||
{
|
||||
var player = new TSPlayer(ply);
|
||||
|
||||
player.Group = TShock.Users.GetGroupForIP(player.IP);
|
||||
|
||||
if (Tools.ActivePlayers() + 1 > TShock.Config.MaxSlots && !player.Group.HasPermission("reservedslot"))
|
||||
|
|
@ -345,8 +347,6 @@ namespace TShockAPI
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!FileTools.OnWhitelist(player.IP))
|
||||
{
|
||||
Tools.ForceKick(player, "Not on whitelist.");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue