pustalorc / globalban Goto Github PK
View Code? Open in Web Editor NEWThis project forked from deadfacerip/globalban
Unturned 3 OpenMod Plugin: Ban users in a MySQL Database
This project forked from deadfacerip/globalban
Unturned 3 OpenMod Plugin: Ban users in a MySQL Database
Add the time identification system in seconds, minutes, hours and days...
Such as:
Ban #1: MIHAIL was banned for TEST on 1 for a total of 7d, 7h, 7m and 7s. Banned by MIHAIL.
Hi, after some usage in my server we noticed that any embed that the plugin tries to send fails.
Wanted to fix it myself but I have never used rest sharp before maybe you could give me a suggestion.
Here is the error:
[20:51:17 ERR][OpenMod.Core.Commands.CommandExecutor] Exception occured on command "unban 76561198881710838" by actor player/[Moderador] Feli (76561198829616065)
System.FormatException: One of the identified items was in an invalid format.
at System.Net.Http.Headers.MediaTypeHeaderValue.set_MediaType (System.String value) [0x00037] in <3ee5766096bc480d9aeb424e1fc9d289>:0
at System.Net.Http.Headers.MediaTypeHeaderValue..ctor (System.String mediaType) [0x00006] in <3ee5766096bc480d9aeb424e1fc9d289>:0
at System.Net.Http.StringContent..ctor (System.String content, System.Text.Encoding encoding, System.String mediaType) [0x00013] in <3ee5766096bc480d9aeb424e1fc9d289>:0
at RestSharp.RequestContent.Serialize (RestSharp.BodyParameter body) [0x00054] in <dfd03b4ab8614e549933c37db1618c06>:0
at RestSharp.RequestContent.AddBody (System.Boolean hasPostParameters) [0x00010] in <dfd03b4ab8614e549933c37db1618c06>:0
at RestSharp.RequestContent.BuildContent () [0x00022] in <dfd03b4ab8614e549933c37db1618c06>:0
at RestSharp.RestClient+<ExecuteRequestAsync>d__3.MoveNext () [0x0011d] in <dfd03b4ab8614e549933c37db1618c06>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0
at RestSharp.RestClient+<ExecuteAsync>d__0.MoveNext () [0x00082] in <dfd03b4ab8614e549933c37db1618c06>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0
at Pustalorc.GlobalBan.API.External.Discord+<SendWebhookPostAsync>d__0.MoveNext () [0x000a1] in <ea0c2d14f2e140389e0946c6aec8801e>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0
at Pustalorc.GlobalBan.GlobalBanPlugin+<SendWebhookAsync>d__13.MoveNext () [0x0019b] in <ea0c2d14f2e140389e0946c6aec8801e>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0
at Pustalorc.GlobalBan.Commands.CommandUnban+<OnExecuteAsync>d__6.MoveNext () [0x006b7] in <ea0c2d14f2e140389e0946c6aec8801e>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0
at OpenMod.Core.Commands.CommandExecutor+<ExecuteAsync>d__7.MoveNext () [0x0034c] in /home/runner/work/openmod/openmod/framework/OpenMod.Core/Commands/CommandExecutor.cs:92
[20:51:18 INF][SDG.Unturned] Connecting: PlayerID: 76561199147006793 Name: angelpapitafrita Character: papas >:)
Should we expect your plugin on RocketMod again, due to the development of RocketModFix?
So, as it currently stands, all groups that hold the permission to ban can ban eachother. I would like to see a feature implemented where a group of higher priority cannot be banned by that of a lower priority, and those within the same group cannot target eachother.
For example, on my server we have a Server Manager group that has more perms than our Admin group, therefore outranking them. With the current system, Admins can not only ban each-other, but can also ban Server Managers.
[ERR][SDG.Unturned] at Pustalorc.GlobalBan.GlobalBanPlugin.CheckBanned (SDG.Unturned.SteamPlayerID playerId, System.UInt32 remoteIp, System.Boolean& isBanned, System.String& banReason, System.UInt32& banRemainingDuration) [0x0003a] in <749f7313e69e41a3a680867e38eafd8d>:0
at (wrapper delegate-invoke) <Module>.invoke_void_SteamPlayerID_uint_bool&_string&_uint&(SDG.Unturned.SteamPlayerID,uint,bool&,string&,uint&)
at SDG.Unturned.Provider.checkBanStatus (SDG.Unturned.SteamPlayerID playerID, System.UInt32 remoteIP, System.Boolean& isBanned, System.String& banReason, System.UInt32& banRemainingDuration) [0x00040] in <a5009557c5954011be8fbda7aaefd349>:0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.