• ULX Source Bans Module
    172 replies, posted
this is my error [ERROR] addons/ulx/lua/ulx/modules/sban_mysql.lua:102: attempt to index local 'q' (a nil value) 1. Query - addons/ulx/lua/ulx/modules/sban_mysql.lua:102 2. Player_CheckBanned - addons/ulx/lua/ulx/modules/sban.lua:124 3. fn - addons/ulx/lua/ulx/modules/sban.lua:190 4. unknown - addons/ulib/lua/ulib/shared/hook.lua:183 5. UniqueID - [C]:-1 6. query - addons/ulib/lua/ulib/shared/sh_ucl.lua:48 7. echoToAdmins - addons/ulx/lua/ulx/log.lua:164 8. fn - addons/ulx/lua/ulx/log.lua:196 9. unknown - addons/ulib/lua/ulib/shared/hook.lua:183
on the site instead of a nickname and displays reason Hieroglyphics what to do?[IMG]https://leto11d.storage.yandex.net/rdisk/5f0756373804430ac8520d927377c2c7/mpfs/81ydYZUWpZki9Wd0BQ7bg4LswTb57L9cmtih8KdJNWt44Bvl6vGa5xDsgKULJPHacP7AcCdara9RYO_jDSTXdA==?uid=0&filename=2015-01-26%2020-56-36%20%D0%A1%D0%BA%D1%80%D0%B8%D0%BD%D1%88%D0%BE%D1%82%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0.png&disposition=inline&hash=&limit=0&content_type=image%2Fpng&rtoken=e78d5016d3968e72317d61f4b092989a&rtimestamp=54c671f0&force_default=no[/IMG]
What's the difference between this and [URL="http://forums.ulyssesmod.net/index.php?topic=5875.0"]this[/URL]? Just wondering.
[QUOTE=GodzBro;47022556]What's the difference between this and [URL="http://forums.ulyssesmod.net/index.php?topic=5875.0"]this[/URL]? Just wondering.[/QUOTE] This adds the SourceBan commands to ULX, as extra commands. The other one, redirects all ULib & ULX bans to SourceBans.
Is there a way to disable the server groups side of things? Basically, I've got donator groups etc and obviously they won't have a sourcebans account and will keep removing their ranks.. Thanks!
I am having issues with the module not keeping bans. Normally this is caused by the MySQL not being configured properly, but I have double checked everything on the server/Sourcebans/and MySQL it all checks out correctly. On startup I am not seeing any "Failed Connections" I have also changed the server id in sbans.lua from -7 to -2 and to 2 (Server ID in Sourcebans is 2) to no avail... Everything is on the same box so I do not see what the problem is and why it is not working correctly. Any help is appreciated. Currently: sban_mysql.lua local SBANDATABASE_HOSTNAME = "localhost" //Database IP/Host local SBANDATABASE_HOSTPORT = 3306 //Database Port local SBANDATABASE_DATABASE = "sb" //Database Database/Schema local SBANDATABASE_USERNAME = "sb" //Database Username local SBANDATABASE_PASSWORD = "omitted" //Database Password ----------------------------------------- sban.lua local SBAN_PREFIX = "sb_" //Prefix dont change if you dont know what you are doing local SBAN_WEBSITE = "omitted" //Source Bans Website //ServerID in sercer.cfg file CreateConVar( "sban_serverid", 2 ) ------------------------------------------- config.php (sourcebans) define('DB_HOST', 'localhost'); // The host/ip to your SQL server define('DB_USER', 'sb'); // The username to connect with define('DB_PASS', 'omitted'); // The password define('DB_NAME', 'sb'); // Database name define('DB_PREFIX', 'sb'); // The table prefix for SourceBans define('DB_PORT','3306'); // The SQL port (Default: 3306) FIX: For some reason the Lib dll was not correct... I used downloads from a seperate source (Not from this tut) and it worked correctly.
Sorry to bump but can someone please help with a slight issue I'm having? I have donator groups that are automatically assigned when donating, however, when they rejoin, sourcebans automatically removes their rank as they are not added in SourceBans. Does anyone have a fix for this? I tried Stupid-'s method but didn't work for me.
[QUOTE=GmodLUA;47268440]Sorry to bump but can someone please help with a slight issue I'm having? I have donator groups that are automatically assigned when donating, however, when they rejoin, sourcebans automatically removes their rank as they are not added in SourceBans. Does anyone have a fix for this? I tried Stupid-'s method but didn't work for me.[/QUOTE] function donator1( ply ) if ( ply:SteamID() == "STEAM_0:1:0000000" ) then ply:SetUserGroup("Donator") end end hook.Add("PlayerSpawn", "donator1", donator1) put it in autorun
Are you actually going to fix this so it doesn't say "banned console" or is this project over?
I installed this and it's working perfectly so far. It'd be useful to have a sourceban unban command server-side.
Sorry i have been really bussy i will remake this module soon. Fixing alot of the problems
[QUOTE=nissedude;47275487]function donator1( ply ) if ( ply:SteamID() == "STEAM_0:1:0000000" ) then ply:SetUserGroup("Donator") end end hook.Add("PlayerSpawn", "donator1", donator1) put it in autorun[/QUOTE] That would still mean having to manually add their ID's every time - which I can do in Sourcebans. The idea is for Sourcebans to completely ignore for specific ULX ranks. Thanks for trying to help though :)
I just just commenting out the code that checks for rank, and the module is better for me now. Since I have an automated donation system. It'd be nice if there was a config option somewhere, but it's pretty straight forward to just remove the code.
[QUOTE=aFullmetalTac;47432047]I just just commenting out the code that checks for rank, and the module is better for me now. Since I have an automated donation system. It'd be nice if there was a config option somewhere, but it's pretty straight forward to just remove the code.[/QUOTE] So like a Group overwrite ? that will skip the check if your in a specifik group?
[QUOTE=FunDK;47435012]So like a Group overwrite ? that will skip the check if your in a specifik group?[/QUOTE] Yeah the module puts people at the rank they are in sourcebans website-side, and that interferes with any automated donation system. So if they donate, the donation system will put them at their donor group but the module will put them right back at user. It might be better if there was a way to turn that off in the config since it can be inconvenient for a lot of people. But it is pretty easy to just get rid of the group check function, so just including some instruction on which code to get rid of if you need to get rid of it will work just as well.
I've disabled the group check aswell as it overwrites my "Autopromote" users that gain ranks depending on their playtime. However multiple plugins cause issues with this plugin when a banned/blocked player is connected, it kicks these players before they are fully initialized. I'm not sure whether this is a problem with the plugins themselves or this one here. I've installed 0.2.3a.
Can anyone help with this error: [ERROR] addons/serverguard/lua/plugins/sourcebans/init.lua:16: No Database Connection 1. error - [C]:-1 2. GetAllActiveBans - addons/serverguard/lua/plugins/sourcebans/init.lua:16 3. LOAD_ACTIVE_BANS - addons/serverguard/lua/plugins/sourcebans/init.lua:14 4. fn - addons/serverguard/lua/plugins/sourcebans/init.lua:48 5. unknown - addons/ulib/lua/ulib/shared/hook.lua:184 I have set everything up correctly and cannot find how to fix it.
no download links anymore?
[QUOTE=zerf;46715303]Here's how you convert bans: First, make sure every admin you can has an account. (If you want, or you can just rely on the default i'll show later) You can use this to help you: [lua] concommand.Add("sourcebans_culx", function() local admins = {} local banstbl = ULib.parseKeyValues(file.Read("yourbansfile.txt")) for sid,data in pairs(banstbl) do if data.admin and string.find(data.admin, "STEAM_") then local adminsid = string.sub(data.admin, string.find(data.admin, "STEAM_"), #data.admin-1) if not admins[adminsid] then admins[adminsid] = string.sub(data.admin, 1, string.find(data.admin, "STEAM_") - 2) end end end for admin, name in pairs(admins) do print(name, admin) end end) [/lua] Then, use this: [lua] concommand.Add("sourcebans_convert_ulx", function() local banstbl = ULib.parseKeyValues(file.Read("yourbansfile.txt")) for sid,data in pairs(banstbl) do local ip = "--" local steamid = sid local name = data.name or "--" local length = data.time or 0 local reason = data.reason or "--" local adminsid = (data.admin and string.find(data.admin, "STEAM_")) and string.sub(data.admin, string.find(data.admin, "STEAM_"), #data.admin-1) or "STEAM_ID_SERVER" SBAN.Player_DoBan(ip, steamid, name, length, reason, adminsid) end end) [/lua] The or xx parts are missing data placeholders. For my missing adminsid placeholder, i used my steamid, but here it uses the console id thing.[/QUOTE] Alright, I've rewritten this post three times because Facepunch kept sending me stupid captcha that redirected me to a blank page... sorry if any of this is tart. Anyway, it's good to have a natively Lua solution, however, the SBAN.Player_DoBan method does not preserve the ban creation time. In addition, I do not believe you are calculating the length correctly, it should be this: [code]local length = data.unban != 0 and data.unban - data.time or 0[/code] I've also written my own conversion program that generates INSERT statements for each ban: [url]https://github.com/PatPeter/ULXSourceBansConverter[/url] Modifying this program requires beginner knowledge of Java and MySQL. If anyone needs help using it, feel free to post an issue on GitHub. [editline]1st August 2015[/editline] [QUOTE=BigBrainAFK;47556173]no download links anymore?[/QUOTE] I've uploaded a Git repository that fixes several issues, for instance admin resetting, as well as logging and ban reasons: [url]https://github.com/PatPeter/ULXSourceBansModule[/url] You can download it and then just drag the ulxsourcebans folder into the addons directory of your server. [editline]1st August 2015[/editline] [QUOTE=FunDK;47384295]Sorry i have been really bussy i will remake this module soon. Fixing alot of the problems[/QUOTE] When or if you do re-write the module, I would highly suggest creating a Git repository and making each of your individual versions a commit. Then, I can take down my repository and send you a pull request with the changes I've made: [code]git init git commit -m "Add version 0.1.1a" git commit -m "Add version 0.1.2a" git commit -m "Add version 0.1.3a" git commit -m "Add version 0.1.4a" git commit -m "Add version 0.1.5a" git commit -m "Add version 0.1.6a" git commit -m "Add version 0.1.7a" git commit -m "Add version 0.2.0a" git commit -m "Add version 0.2.1a" git commit -m "Add version 0.2.2a" git commit -m "Add version 0.2.3a"[/code] And with your code on GitHub, you don't ever have to worry about download links going down :)
I've got this errror: [ERROR] addons/ulx/lua/ulx/modules/sban.lua:48: attempt to index global 'SBAN_MYSQL' (a nil value) 1. Admin_GetInfo - addons/ulx/lua/ulx/modules/sban.lua:48 2. Admin_Update - addons/ulx/lua/ulx/modules/sban.lua:84 3. unknown - addons/ulx/lua/ulx/modules/sban.lua:207 4. unknown - lua/includes/modules/concommand.lua:54 What i'm doing wrong?
-snip-
Hey, Why Banned Admin is:CONSOLE in website How can i change?
Is there going to be an update for this ever again, I am getting this error. [CODE][ERROR] addons/ulx-modules-sourcebans/lua/ulx/modules/sh/sban_menu.lua:16: queueFunctionCall received a bad function 1. error - [C]:-1 2. queueFunctionCall - addons/ulib/lua/ulib/shared/util.lua:431 3. call - addons/ulx-modules-sourcebans/lua/ulx/modules/sh/sban_menu.lua:16 4. __fn - addons/ulib/lua/ulib/shared/commands.lua:943 5. unknown - addons/ulib/lua/ulib/shared/commands.lua:1296 6. Run - lua/includes/modules/concommand.lua:54 7. unknown - addons/ulib/lua/ulib/shared/commands.lua:1311 8. unknown - lua/includes/modules/concommand.lua:54 [/CODE]
Sorry, you need to Log In to post a reply to this thread.