Ban function does not seem to workFixed

Hello!

So I did a 2d ban on a player steamid: 76561198396542025 for overteaming (banned the 3 others aswell).

But he kept coming back, even after I did perma, he managed to rejoin with the same steamid. When I banned him, I wrote his name, which indeed kicked him. But he could still join (though the chat reported him as dirty).

How is he doing this? At the end I had to do a banid in console... :)

@Smoke92 could you possibly send me logs at this time when you banned him? So that I can investigate the matter.

Same problem. Here are my logs.

[Server Armour] digit of ban length is 1
174.101.53.219:63449/76561199063400351/poppyscrap01 kicked: test
[Server Armour] Player poppyscrap01 (76561199063400351) was kicked, test
[Server Armour] Player poppyscrap01 was kicked for `test` 
 [Server Armour] No discord API plugin loaded, will not publish to hook! 
[Server Armour] No discord API plugin loaded, will not publish to hook! 
[Tebex Donate] Attempting to log all stored connection events... 
[Tebex Donate] Successfully logged all stored connection events! 
 10/12/2020 2:05:50 PM|Fatal|WebSocket.<startReceiving>b__170_2|System.ObjectDisposedException: Cannot access a disposed object.
                            Object name: 'SslStream'.
                              at System.Net.Security.SslStream.CheckDisposed () [0x00008] in <14e3453b740b4bd690e8d4e5a013a715>:0 
                              at System.Net.Security.SslStream.get_Impl () [0x00000] in <14e3453b740b4bd690e8d4e5a013a715>:0 
                              at System.Net.Security.SslStream.EndRead (System.IAsyncResult asyncResult) [0x00000] in <14e3453b740b4bd690e8d4e5a013a715>:0 
                              at WebSocketSharp.Ext+<>c__DisplayClass54_0.<ReadBytesAsync>b__0 (System.IAsyncResult ar) [0x00002] in <7126fb4f5c5b40029458a4f975f98d13>:0 
[Discord Extension] Reconnect has been called (opcode 7)! Reconnecting... 
[Discord Extension] Discord connection closed uncleanly: code 1006, Reason: 
[Discord Extension] Attempting to reconnect to Discord...
[Discord Extension] Discord socket opened!
[Discord Extension] Attempting resume opcode...
[Discord Extension] Discord socket opened! 
[Discord Extension] Warning: tried to create a heartbeat when one is already registered. 
[Discord Extension] Attempting resume opcode... 
[Discord Extension] Session resumed! 
174.101.53.219:57129/76561199063400351/poppyscrap01 joined [windows/76561199063400351]
poppyscrap01[76561199063400351] has spawned 
[Server Armour] Player 76561199063400351 is at steam level 1 
[Tebex Donate] Attempting to log all stored connection events... 
[Tebex Donate] Successfully logged all stored connection events! 
@ZachDLC could you please confirm the length of the ban? What was the command that was passed? If it was 1hour, which timezone are you in?
5e6f8629518b5.jpg Pho3niX90
@ZachDLC could you please confirm the length of the ban? What was the command that was passed? If it was 1hour, which timezone are you in?

It was a 1h or 1 hour ban for a test. I believe the exact command was /ban poppy test 1h. I am in the Central time zone of the US, however my server is hosted by, and times shown in UTC, or zulu time.

ZachDLC

It was a 1h or 1 hour ban for a test. I believe the exact command was /ban poppy test 1h. I am in the Central time zone of the US, however my server is hosted by, and times shown in UTC, or zulu time.

Intresting. my assumption was that it might have been UTC time not converting correctly back, as all ban times are also saved in UTC.  

If you can, coud you maybe try a 3h ban time for testing purposes?
5e6f8629518b5.jpg Pho3niX90

Intresting. my assumption was that it might have been UTC time not converting correctly back, as all ban times are also saved in UTC.  

If you can, coud you maybe try a 3h ban time for testing purposes?

Done. Same messages in chat. No need to repaste. Players rejoined without issue.

Im also having this same problem.
for an example.

here is my log.
my server is sync with my local timezone.
im been using this plugin for like 2 mth and always had this problem. 

any ideas?

command:
ban 76561############ "Toxic" 99999

(02:36:54) | sa.ban <playerNameOrID> "<reason>" length (example: 1h for 1 hour, 1m for 1 month etc)
(02:38:12) | [Server Armour] digit of ban length is 99999
(02:38:12) | [Server Armour] Player TEST (76561############) was kicked, Toxic
(02:38:12) | [Server Armour] Player TEST was kicked for `Toxic`
(02:39:05) | TEST [76561############] has spawned
(02:39:06) | [Server Armour] My Bans
(02:39:06) | [Server Armour]   at System.DateTimeParse.ParseExact (System.String s, System.String format, System.Globalization.DateTimeFormatInfo dtfi, System.Globalization.DateTimeStyles style) [0x0002a] in <fb001e01371b4adca20013e0ac763896>:0 
  at System.DateTime.ParseExact (System.String s, System.String format, System.IFormatProvider provider) [0x00008] in <fb001e01371b4adca20013e0ac763896>:0 
  at Oxide.Plugins.ServerArmour.ConverToDateTime (System.String stringDate) [0x00000] in <6671f5475d6c4bdb8c76c7c38a083577>:0 
  at Oxide.Plugins.ServerArmour.ConvertToTimestamp (System.String value) [0x00000] in <6671f5475d6c4bdb8c76c7c38a083577>:0 
  at Oxide.Plugins.ServerArmour+ISABan.GetUnixBanUntill () [0x00000] in <6671f5475d6c4bdb8c76c7c38a083577>:0 
  at Oxide.Plugins.ServerArmour.<IsBanned>m__7 (Oxide.Plugins.ServerArmour+ISABan x) [0x0001b] in <6671f5475d6c4bdb8c76c7c38a083577>:0 
  at System.Linq.Enumerable.TryGetFirst[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate, System.Boolean& found) [0x0003f] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 
  at System.Linq.Enumerable.First[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x00000] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 
  at Oxide.Plugins.ServerArmour.IsBanned (System.String steamid) [0x00126] in <6671f5475d6c4bdb8c76c7c38a083577>:0​

same with the unban if u use the sa.unban command u get a huge error

 

[23.10.2020 14:48:27] Failed to call hook 'SCmdUnban' on plugin 'ServerArmour v0.4.995' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.ServerArmour.<RemoveBans>m__5 (Oxide.Plugins.ServerArmour+ISABan x) [0x0001b] in <65605038018d4146a22672de6fbd49ab>:0

at System.Collections.Generic.List`1[T].RemoveAll (System.Predicate`1[T] match) [0x0001a] in <fb001e01371b4adca20013e0ac763896>:0

at Oxide.Plugins.ServerArmour.RemoveBans (System.String id) [0x0003e] in <65605038018d4146a22672de6fbd49ab>:0

at Oxide.Plugins.ServerArmour.SaUnban (System.String playerId, Oxide.Core.Libraries.Covalence.IPlayer player) [0x0005c] in <65605038018d4146a22672de6fbd49ab>:0

at Oxide.Plugins.ServerArmour.SCmdUnban (Oxide.Core.Libraries.Covalence.IPlayer player, System.String command, System.String[] args) [0x00029] in <65605038018d4146a22672de6fbd49ab>:0

at Oxide.Plugins.ServerArmour.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x01cf0] in <65605038018d4146a22672de6fbd49ab>:0

at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <d09a1f46ca2f4432811bcfe45ad13c7b>:0

at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <cf88a28c7fb44d36890d85a78331cc9d>:0

at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <cf88a28c7fb44d36890d85a78331cc9d>:0

Please try v0.5.1 and advise.

Going to close this for the time being. 

Locked automatically