• ULX Source Bans Module
    172 replies, posted
[QUOTE=metrotyranno;45720343]What did i do wrong? // MODULE: sban_mysql.lua // [ERROR] addons/ulx/lua/ulx/modules/sban_mysql.lua:5: Couldn't load module library! 1. require - [C]:-1 2. unknown - addons/ulx/lua/ulx/modules/sban_mysql.lua:5 3. include - [C]:-1 4. unknown - addons/ulx/lua/ulx/init.lua:28 5. include - [C]:-1 6. unknown - addons/ulx/lua/ulib/modules/ulx_init.lua:2 7. include - [C]:-1 8. unknown - addons/ulib/lua/ulib/init.lua:68 9. include - [C]:-1 10. unknown - addons/ulib/lua/autorun/ulib_init.lua:3[/QUOTE] Do you properly have mysqloo installed?
[QUOTE=Chimpanzee;45724081]Do you properly have mysqloo installed?[/QUOTE] Yes I have redownloaded it and installed it in lua/bin The OS is Debian 64Bit and is using TCAdmin (might be a problem?)
ldd /path/to/your/garrys/mod/dir/libmysql.so.16 when you miss his lib i have upload it [url]http://178.63.93.210/libmysql.so.16[/url]
Also, darkrp seems to hate this, the server crashes when someone bans / kicks Edit to the statement above: i just tested it on a deathrun server and the kick / ban / sban commands just crash the server, the only way to kick / ban someone is from sourcebans. all other commands work fine eg: slay slap whip ect. [B]Darkrp spits out:[/B] [DarkRP] gamemodes/darkrp/gamemode/modules/base/sv_entityvars.lua:196: Tried to use a NULL entity! 1. SteamName - [C]:-1 2. Nick - gamemodes/darkrp/gamemode/modules/base/sv_entityvars.lua:196 3. RP_PlayerChat - gamemodes/darkrp/gamemode/modules/chat/sv_chat.lua:21 4. unknown - gamemodes/darkrp/gamemode/modules/chat/sv_chat.lua:83 [B]Deathrun spits out:[/B] ServerLog: [ULX] (Console) banned Themself for 1 minute(s) (test) [ERROR] addons/ulx/lua/ulx/modules/sh/chat.lua:250: Tried to use a NULL entity! 1. __newindex - [C]:-1 2. fn - addons/ulx/lua/ulx/modules/sh/chat.lua:250 3. unknown - addons/ulib/lua/ulib/shared/hook.lua:183
[QUOTE=npd1124;45718101][url]http://pastebin.com/KWZ7QkjW[/url] here you go just replace the sban.lua with that. Its a pretty shitty way to do it but it works[/QUOTE] done that seems as if its working now, thanks!
[QUOTE=F14;45738379]done that seems as if its working now, thanks![/QUOTE] No problem
ULX is not saving the bans in sb_bans... Please help. Also, sourceban's server groups are not being applied on the server either. I think that ULX is not communicating with the database, but the info is identical to the sourcebans database info.
Anyone figured out a way to convert banned_users.cfg to bans.txt?
DEl
giraff you are probably using SourceBans 2.0, this module only works perfect for me on version 1.4.11. You can find the download links on this [URL="https://forums.alliedmods.net/showthread.php?t=61000"]thread[/URL]. Also, @F14 and others I was able to stop updating certain user groups with the following code. Starting from line 82 in sban.lua, just added the simple if statement with ply:GetUserGroup() [CODE] //Update Admin function SBAN.Admin_Update( ply, group ) SBAN.Admin_GetInfo( ply:SteamID(), function( aid, group ) if aid != nil || group != nil then SBAN.Admin_CheckServerID( aid, function( hasaccess ) local reset = true if hasaccess then if group != nil then reset = false if (ULib.ucl.getUserRegisteredID( ply ) == nil || ply:GetUserGroup() != group ) then ulx.adduserid( ply, ply:SteamID(), group ) end end end if reset then if ply:GetUserGroup() == "donator" or ply:GetUserGroup() == "secondVIPclass" then //Do Nothing else SBAN.Admin_Reset( ply ) //Reset admin end end end ) else if ply:GetUserGroup() == "donator" or ply:GetUserGroup() == "secondVIPclass" then //Do Nothing else SBAN.Admin_Reset( ply ) //Reset admin end end end ) end [/CODE]
[QUOTE=stupid-;45868493]giraff you are probably using SourceBans 2.0, this module only works perfect for me on version 1.4.11. You can find the download links on this [URL="https://forums.alliedmods.net/showthread.php?t=61000"]thread[/URL]. Also, @F14 and others I was able to stop updating certain user groups with the following code. Starting from line 82 in sban.lua, just added the simple if statement with ply:GetUserGroup() [CODE] //Update Admin function SBAN.Admin_Update( ply, group ) SBAN.Admin_GetInfo( ply:SteamID(), function( aid, group ) if aid != nil || group != nil then SBAN.Admin_CheckServerID( aid, function( hasaccess ) local reset = true if hasaccess then if group != nil then reset = false if (ULib.ucl.getUserRegisteredID( ply ) == nil || ply:GetUserGroup() != group ) then ulx.adduserid( ply, ply:SteamID(), group ) end end end if reset then if ply:GetUserGroup() == "donator" or ply:GetUserGroup() == "secondVIPclass" then //Do Nothing else SBAN.Admin_Reset( ply ) //Reset admin end end end ) else if ply:GetUserGroup() == "donator" or ply:GetUserGroup() == "secondVIPclass" then //Do Nothing else SBAN.Admin_Reset( ply ) //Reset admin end end end ) end [/CODE][/QUOTE] i can make an update so you can set this up in the config if you guys want ?
Sure, that'd be helpful. Also, an issue I seem to be having, I'm using the latest version of ULX and when I ban someone with sban, it says that "Stupid has banned (CONSOLE) for #### minutes (reason)". It doesn't actually say who I banned, just console. It works, it properly adds them to sourcebans, just doesn't display properly in game.
[QUOTE=stupid-;45889848]Sure, that'd be helpful. Also, an issue I seem to be having, I'm using the latest version of ULX and when I ban someone with sban, it says that "Stupid has banned (CONSOLE) for #### minutes (reason)". It doesn't actually say who I banned, just console. It works, it properly adds them to sourcebans, just doesn't display properly in game.[/QUOTE] i will work on that today then. the CONSOLE bug, the fix is to use the version on github [url]https://github.com/Nayruden/Ulysses[/url]
i am using the updated version of ULX and it still says Player banned CONSOLE in chat.
Yeah, I am also using the latest github version.
Alright, I realize that there has to be some way of making sure that the user banning is registered on the SourceBans site, but resetting the ULX group of these users is not the way to do it. This has the side effect of removing the group from my regulars, which do not have any admin abilities. I commented out line 105 of sban.lua to stop it from removing the rights of all my users. Also, when the server fails to connect to MySQL, it gives this error: [CODE][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[/CODE] Because of this: [CODE][SBAN_ULX][MYSQL] Connection to database failed [SBAN_ULX][MYSQL] Error:Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)[/CODE] If the connection fails, it would be nice if the addon disabled itself so that we don't get lua errors like this (like put a conditional in each method that calls the database and define a variable as to whether it's connected or not).
-Snip- -Almost certain I have found the cause.
Couple questions! :) 1. -snip- Figured it out. 2. Is there no way to make this works with !ban? !sban is adequate but everyone knows !ban, I guess it's just a pet peeve of mine. Thanks!
How to disable user sync with website?
Is there a way to sban via a Server Console? when trying either ulx sban NAME Amount Reason or ulx sbanid STEAMID amount reason I always get the errors [code] sban [ERROR] addons/ulx/lua/ulx/modules/sh/sban_menu.lua:45: attempt to call method 'SteamID' (a nil value) 1. call - addons/ulx/lua/ulx/modules/sh/sban_menu.lua:45 2. __fn - addons/ulib/lua/ulib/shared/commands.lua:943 3. unknown - addons/ulib/lua/ulib/shared/commands.lua:1296 4. unknown - lua/includes/modules/concommand.lua:69 Sbanid [ERROR] addons/ulx/lua/ulx/modules/sh/sban_menu.lua:13: attempt to call method 'SteamID' (a nil value) 1. call - addons/ulx/lua/ulx/modules/sh/sban_menu.lua:13 2. __fn - addons/ulib/lua/ulib/shared/commands.lua:943 3. unknown - addons/ulib/lua/ulib/shared/commands.lua:1296 4. unknown - lua/includes/modules/concommand.lua:69 [/code] I am writing scripts that I want to trigger sourcebans without making a client do it
Is there any way to bypass having to add donators to sourcebans? I'm using the module at the moment and the donators have to be on sourcebans or their rights get removed everytime.
How to disable sourcebans group sync? I want to use ULX only ranks.
Ok not sure if this is just me or what but when i ban someone on the server with sban. it adds them to sourcebans site but they are able to join anyways. the ban is there. its perm or timed and yet rejoining works. Did i set something up wrong? do i need something like gatekeeper as well? seems its just a list of people that doesnt actually do anything [editline]13th October 2014[/editline] [QUOTE=ThatCrazyGuy;46085739]Is there any way to bypass having to add donators to sourcebans? I'm using the module at the moment and the donators have to be on sourcebans or their rights get removed everytime.[/QUOTE] Comment out the admin update section ( example in earlier post on this thread) [editline]13th October 2014[/editline] [QUOTE=xSkyer;46165395]How to disable sourcebans group sync? I want to use ULX only ranks.[/QUOTE] Same as above
Please need the plugin for [B]SourceBans 2.0.0-dev[/B] Thank you in advance. - Killer0561
[QUOTE=kulcris;46218989]Ok not sure if this is just me or what but when i ban someone on the server with sban. it adds them to sourcebans site but they are able to join anyways. the ban is there. its perm or timed and yet rejoining works. Did i set something up wrong? do i need something like gatekeeper as well? seems its just a list of people that doesnt actually do anything [editline]13th October 2014[/editline] Comment out the admin update section ( example in earlier post on this thread) [editline]13th October 2014[/editline] Same as above[/QUOTE] Guess noone knows? anyone have any sort of ideas?
The only problems that honestly needs to be fixed are: - !sban on a player in game shows up as banned (CONSOLE) - admins need to be added to source bans to make bans show up (not a problem but would be nice to not have that) Please fix the console bug, we all have the newest version on uLiB / ULX!
[QUOTE=F14;46363552]The only problems that honestly needs to be fixed are: - !sban on a player in game shows up as banned (CONSOLE) - admins need to be added to source bans to make bans show up (not a problem but would be nice to not have that) Please fix the console bug, we all have the newest version on uLiB / ULX![/QUOTE] i dont have the console bug? I dont actually use the ulx sban/sbanid commands though because I have custom ban commands, and I just converted it to the main ulx commands.
[QUOTE=Sm63;46370775]i dont have the console bug? I dont actually use the ulx sban/sbanid commands though because I have custom ban commands, and I just converted it to the main ulx commands.[/QUOTE] oh ok interesting, recon you could help me out with this? Or help everyone? Maybe make a thread! :)
Shit got a bad problem. When I'm adding a user on sourcebans in the group superadmin he's getting writting in the MySQL Database. But when he's joining the server he is still in the group guest. Does anyone know a fix? ________________________________________ Edit: I'm stupid. I forgot to add in der server.cfg sbans_serverid (id) Lol don't concern my post :P But cheers to the developer, really nice made script!
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.
Sorry, you need to Log In to post a reply to this thread.