EnhancedBanSystem

Moved

Total Downloads: 3,116 - First Release: Jun 6, 2016 - Last Update: Feb 24, 2018

5/5, 18 likes
  1. Hello,

    I am trying to use EnhancedBanSystem with the following config :
    I want to use the files method, but every time i try to reload the plugin i get an error about mysql but i am not even using it.
    Code:
    MySQL: Loaded
    [12/19/2016 10:41:15] [Oxide] 10:41 AM [Debug] ExType: MySqlException
    [12/19/2016 10:41:15] [Oxide] 10:41 AM [Debug] at System.Net.Dns.hostent_to_IPHostEntry (System.String h_name, System.String[] h_aliases, System.String[] h_addrlist) [0x00000] in <filename unknown>:0
    at System.Net.Dns.GetHostByName (System.String hostName) [0x00000] in <filename unknown>:0
    at System.Net.Dns.GetHostEntry (System.String hostNameOrAddress) [0x00000] in <filename unknown>:0
    at MySql.Data.Common.MyNetworkStream.GetHostEntry (System.String hostname) [0x00000] in <filename unknown>:0
    at MySql.Data.Common.MyNetworkStream.CreateStream (MySql.Data.MySqlClient.MySqlConnectionStringBuilder settings, Boolean unix) [0x00000] in <filename unknown>:0
    at MySql.Data.Common.StreamCreator.GetTcpStream (MySql.Data.MySqlClient.MySqlConnectionStringBuilder settings) [0x00000] in <filename unknown>:0
    at MySql.Data.Common.StreamCreator.GetStream (MySql.Data.MySqlClient.MySqlConnectionStringBuilder settings) [0x00000] in <filename unknown>:0
    at MySql.Data.MySqlClient.NativeDriver.Open () [0x00000] in <filename unknown>:0
    
    Config:
    Code:
    {
      "Ban - Broadcast": true,
      "Ban - Default Reason": "Banned",
      "Ban - Evade": true,
      "Ban - Evade Reason": "Ban Evade",
      "Ban - Log": true,
      "DataType - Files - use": true,
      "DataType - MySQL - Database": "banlist",
      "DataType - MySQL - Host": "",
      "DataType - MySQL - Pass": "",
      "DataType - MySQL - Port": 3306,
      "DataType - MySQL - use": false,
      "DataType - MySQL - User": "",
      "DataType - Native - use": false,
      "DataType - PlayerDatabase - IP Filename": "EnhancedBanSystem_IPs.json",
      "DataType - PlayerDatabase - use": false,
      "DataType - SQLite - Database Filename": "banlist.db",
      "DataType - SQLite - use": false,
      "DataType - WebAPI - Banlist": "[URL]http://webpage.com/banlist.php?startid={startid}[/URL]",
      "DataType - WebAPI - Host": "[URL]http://webpage.com/api.php?action=ban&pass=mypassword&id={id}&steamid={steamid}&name={name}&ip={ip}&reason={reason}&source={source}&game={game}&platform={platform}&server={server}&tempban={expiration}[/URL]",
      "DataType - WebAPI - IsBanned": "[URL]http://webpage.com/api.php?action=isbanned&pass=mypassword&id={id}&update={update}&steamid={steamid}&ip={ip}&time={time}&name={name}&game=Rust&server=rust.kortal.org:28015[/URL]",
      "DataType - WebAPI - Unban": "[URL]http://webpage.com/api.php?action=unban&pass=mypassword&steamid={steamid}&name={name}&ip={ip}&name={name}&source={source}[/URL]",
      "DataType - WebAPI - use": false,
      "Denied Connection - Log": true,
      "Kick - Broadcast": true,
      "Kick - Log": true,
      "Kick - On Ban": true,
      "Permissions - Ban": "enhancedbansystem.ban",
      "Permissions - Banlist": "enhancedbansystem.banlist",
      "Permissions - Kick": "enhancedbansystem.kick",
      "Permissions - Unban": "enhancedbansystem.unban",
      "Server Info - Game": "Rust",
      "Server Info - IP:PORT": "134.255.235.28:28066",
      "Server Info - Platform": "Steam"
    }
     
    Last edited by a moderator: Dec 19, 2016
  2. I'm trying to give my moderator group access to ban and kick. I've got enhanced ban system installed, I have given the permissions needed but I still don't access? I also installed Player Database and made the folder as it asked to on the plugin page.

    Not sure if I'm just being stupid, but it's seriously not working, can anyone possibly point me in the right direction. If there's any other information you need, just let me know.

    Thanks in advance.
     
  3. Wulf

    Wulf Community Admin

    What are the exact commands you used to grant the permissions?
     
  4. grant group moderator enhancedbansystem.ban (and the rest of the perms for enhanced ban system)
     
  5. Wulf

    Wulf Community Admin

    And what message did you see? Are you sure they are in that group too?
     
  6. (19:58:44) | Group 'moderator' granted permission 'enhancedbansystem.ban'

    I've tried adding myself to group "moderator" and removing myself from "default".

    Moderator is a parent of default also, so I get the default base permissions, not sure if this is relevant information
     
  7. Wulf

    Wulf Community Admin

    You can't remove yourself from default really, you're added back automatically next connect, but that isn't the issue. Does the 'show group moderator' command list you in it?
     
  8. I fixed it, it was because I wasn't adding the 64id as the username(apparently?) I was adding players to the moderator group with their username. Kinda new to rust server configuration and whatnot but got there in the end.

    I appreciate the help, man.
     
  9. Wulf

    Wulf Community Admin

    Either should work, but ID is more reliable.
     
  10. Hey,

    The ban system is working great. Only thing that I'm not sure how to fix/change is the default Rust kick/ban messages that appear in chat when someone is kicked/banned.

    Screenshot

    Any help on removing default Rust messages would be great.
     
  11. Ooook.... So I do have a huge problem - after attempting to ban anybody the server instantly crashes. No errors, no log messages, just a crash. And nothing to start with.

    I've tried to use files and playerdatabase - same result. Instant crash after using ban.....
     
  12. what game?
     
  13. Ye, forgot to mention - Rust.
     
  14. well then you will need to send me more info.
    as it shouldn't crash your serv, a lot of us use it mainly on rust.
     
  15. More? I have nothing = as I said. The server just instantly crashes. On the fresh server it works fine, But for some reason with over mods it just crashes..... I'm gonna try to find what is causing this, but for now - do you have any ideas why this can happen?
     
  16. getting this in console now,
    Failed to call hook 'OnUserConnected' on plugin 'EnhancedBanSystem v5.0.9' (NullReferenceException: Object reference not set to an instance of an object)
     
  17. Wulf

    Wulf Community Admin

    Check your logs for the full error please.
     
  18. Code:
    00:08 [Error] Failed to call hook 'OnUserConnected' on plugin 'EnhancedBanSystem v5.0.9' (NullReferenceException: Object reference not set to an instance of an object)
    00:08 [Stacktrace]   at Oxide.Plugins.EnhancedBanSystem.GetNewID () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.EnhancedBanSystem+BanData..ctor (System.Object source, System.String userID, System.String name, System.String ip, System.String reason, Double duration) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.EnhancedBanSystem.isBanned_Delayed (System.String name, System.String steamid, System.String ip, Boolean update) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.EnhancedBanSystem.OnUserConnected (IPlayer player) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.EnhancedBanSystem.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
    [DOUBLEPOST=1484361078][/DOUBLEPOST]When I deleted plugin and reinstalled it worked fine, but now it has gone back to doing that and giving that error. Producing this message aswell when trying to unban someone.

    "1:24 PM [Error] MySql handle raised an exception (Exception: Connection is null)
    1:24 PM [Stacktrace] at Oxide.Core.MySql.Libraries.MySql+MySqlQuery.Handle () [0x00000] in <filename unknown>:0
    13:24 [Info] SQLite: 0 matching bans were removed"

    And this message when trying to ban someone.
    "13:26 [Info] ERROR:Object reference not set to an instance of an object".
     
    Last edited by a moderator: Jan 14, 2017
  19. it doesnt conenct to the mysql that's why
     
  20. I've found the reason for the server crashes - I've made translated version of the lang file. For some reason if there is more then one lang file - the plugin crash the server. Removing translated verion from lang/ru folder solved my problem, but I still have no idea why this happend.