Share existing bans to the communitySolved

Hey,

It would be create if the users already banned on the servers (through bans.cfg ?) could be reported to serverarmour on the first load, this would leverage the actions already taken by admins and you should also have comments with them.

Regards,

Hey

This is already implemented :) It checks local native bans against the server, and then pushes it along with the reason.

Line #118 CheckLocalBans();
Oh ok, I missed that, however it seems not working for me :

(11:29:34) | [Server Armour] Checking local user ban 1 of 29
(11:29:34) | [Server Armour] Adding ban for *********************** with reason `abusive behaviour`, and expiry 2070/01/01 00:59 to server armour.
(11:29:34) | Failed to run a 1.00 timer in 'ServerArmour v0.3.4' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.ServerArmour.AddBan (Oxide.Core.Libraries.Covalence.IPlayer player, Oxide.Plugins.ServerArmour+ISABan thisBan) [0x0003e] in <423c355c3a4942ffb8ca58dea16ac57a>:0 
  at Oxide.Plugins.ServerArmour+<CheckLocalBans>c__AnonStorey5.<>m__0 () [0x00193] in <423c355c3a4942ffb8ca58dea16ac57a>:0 
  at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00018] in <ac41dd3599754d448b8c218b34645820>:0​


Merged post

running version 0.3.4

Merged post

In my case player is null, it even displays steamid in Puts, but AddBan requires a player -(
Puts($"Adding ban for {((player == null) ? usr.steamid.ToString() : player.Name)} with reason `{usr.notes}`, and expiry {expireDate.ToString(DATE_FORMAT)} to server armour.");
                        AddBan(player, new ISABan {​


Merged post

Nevermind you already discussed it on https://umod.org/community/server-armour/21183-nullreferenceexception-at-addban
Good spot :) I only figured that out yesterday XD I will push the fix today
Locked automatically