Fix a bug in rolebans. (#7029)

This commit is contained in:
Moony
2022-03-07 22:28:47 -06:00
committed by GitHub
parent 3532600b88
commit 5c26555144

View File

@@ -37,7 +37,7 @@ public sealed class RoleBanManager
return;
var netChannel = e.Session.ConnectedClient;
await CacheDbRoleBans(e.Session.UserId, netChannel.RemoteEndPoint.Address, netChannel.UserData.HWId);
await CacheDbRoleBans(e.Session.UserId, netChannel.RemoteEndPoint.Address, netChannel.UserData.HWId.Length == 0 ? null : netChannel.UserData.HWId);
}
private async Task<bool> AddRoleBan(ServerRoleBanDef banDef)