1. Post #81
    ReignofTerr0r's Avatar
    August 2009
    46 Posts
    Ok so every time I start my server and someone connects I get
    Code:
    [11/15/10 14:08:38][SourceBans.lua] The server has lost connection to the database. Retrying...
    yet I can still connect to the same database successfully right after that from the exact same server. (I'm hosting it from home). I am currently using a self-coded ULX plugin that works just fine and has no errors. I would really like for this to work.

  2. Post #82
    jdmmer's Avatar
    August 2009
    250 Posts
    I get this error:

    [addons\evolve\lua\includes\modules\sourcebans.lua: 126] attempt to concatenate local 'id' (a nil value)

    Your plugin was included by Evolve admin. How to fix that?

  3. Post #83
    Mr.Thorn's Avatar
    July 2010
    201 Posts
    Interesting, does this still work or has garry's "updates" total'd it.

  4. Post #84
    Gold Member
    .\\Shadow}'s Avatar
    November 2009
    900 Posts
    Interesting, does this still work or has garry's "updates" total'd it.
    For me, it never worked (Could have just been the way I was doing it). I doubt he's updating it, either.

  5. Post #85
    z3r0killz's Avatar
    February 2011
    79 Posts
    Somebody call overv!!!!

  6. Post #86
    JamieH is a retarded bitch <3
    Pantho's Avatar
    July 2008
    2,211 Posts
    For me, it never worked (Could have just been the way I was doing it). I doubt he's updating it, either.
    He updates it when needed afaik. He fixed all the issues I mentioned with it, same with lexical tools.

    We use the mod right now with the latest sban website code. Module works perfectly with no modifications to the module.

  7. Post #87
    Buggzie's Avatar
    December 2009
    965 Posts
    Overv isn't working on Evolve anymore, looks like you'll have to post a bugfix yourself ;p
    Reply With Quote Edit / Delete Reply Australia Show Events Informative Informative x 1 (list)

  8. Post #88
    peopleofgaming.com
    erie1555's Avatar
    January 2009
    1,087 Posts
    Any help with this error:
    Lua Error: [04/17/11 11:49:39][SourceBans.lua] Player Ketchup joined, but SourceBans.lua is not active!

  9. Post #89
    Gold Member
    Lexic's Avatar
    March 2009
    6,123 Posts
    You haven't turned it on with sourcebans.Activate();
    I'm going to look into this Evolve issue, it's affecting my server as well.

  10. Post #90
    Hi Jo
    Jo The Shmo's Avatar
    February 2009
    22,911 Posts
    Does anyone know why the sourcebans web control panel wouldn't be able to connect to the server?
    It just says "Error connecting (184.172.12.55:27015)" when I list the servers and I am relatively sure everything is set up correctly.

    Edited:

    Oh wait it seems to kick people just fine, but it still doesn't keep them banned (an error that I had earlier too)

  11. Post #91
    Gold Member
    Lexic's Avatar
    March 2009
    6,123 Posts
    Did you give it the right rcon password + open up ports?

  12. Post #92
    Hi Jo
    Jo The Shmo's Avatar
    February 2009
    22,911 Posts
    Yeah, it can ban people fine, everything works, it just says error connecting and can never list the players on the server.
    It's not a huge problem, I just thought it was weird.

  13. Post #93
    JamieH is a retarded bitch <3
    Pantho's Avatar
    July 2008
    2,211 Posts
    Yeah, it can ban people fine, everything works, it just says error connecting and can never list the players on the server.
    It's not a huge problem, I just thought it was weird.
    Do you have a secondary web host you could test on? Could be some restrictive firewall on your web host.

  14. Post #94
    Gold Member
    Lexic's Avatar
    March 2009
    6,123 Posts
    [Uploaded 1.51.]
    At some point this stopped working, god knows why. Should be fixed now.

    Edited:

    Oh whoops, I didn't even announce that I'd uploaded 1.5, sorry.
    If you've got gatekeeper this will use it, and it's got the option to show the ban reason to the victim. Config option showbanreason.
    Not sure if the config option "website" was present before, but you can tell it your website and it tells banned users to go there.

  15. Post #95
    Gold Member
    Lexic's Avatar
    March 2009
    6,123 Posts
    [Uploaded 1.52]
    * Added sm_chat
    * Added sm_say
    * Added sm_psay
    * Added sm_csay
    * Added SBANS_NO_COMMANDS to disable all concommands should they not be wanted.
    Reply With Quote Edit / Delete Reply Windows 7 United Kingdom Show Events Lua King Lua King x 1Friendly Friendly x 1 (list)

  16. Post #96

    October 2011
    140 Posts
    how should we be passing the admin to the ban functions?
    The ban isn't showing the admin that banned on sourcebans. I tried passing the steamID but that didn't work.

  17. Post #97
    rokrox's Avatar
    October 2011
    221 Posts
    how should we be passing the admin to the ban functions?
    The ban isn't showing the admin that banned on sourcebans. I tried passing the steamID but that didn't work.
    I'm having the same issue, ULX uses a "calling_ply" arguement that is difficult to convert to the getadmininformation function of this module.

  18. Post #98
    I hide under your bed
    Dennab
    July 2011
    1,877 Posts
    For a moment i thought this addon implemented that stupid 3rd party VAC thing (its basically a global banlist that a 3rd party maintains, i forget the name). But seeing as it isn't, this actually looks quite nice.

  19. Post #99

    October 2011
    140 Posts
    Ok I am trying to get this to display the banning admin in sourcebans but having no luck.

    Can anyone familiar with this plugin/module tell me how to convert a SteamID to a adminID within a function of the module.

    I am just trying to copy and past the doban function at this point and pass it a string with the SteamID of the admin but I can't figure out how to then convert it to the adminID for the query to pass to the sourcebans database.
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Dumb Dumb x 1 (list)

  20. Post #100
    Gold Member
    Lexic's Avatar
    March 2009
    6,123 Posts
    Sorry guys - this thread keeps dropping off my "Read threads with new posts" list.
    I'll fix that as soon as I'm on my Windows machine.
    Tell me, have you updated the PHP Sourcebans version on your website or something? That function used to work fine.

    Edited:

    Ah yes, there's been two sourcebans updates released since I last updated. Time to find out what they've done.

  21. Post #101
    JamieH is a retarded bitch <3
    Pantho's Avatar
    July 2008
    2,211 Posts
    Sorry guys - this thread keeps dropping off my "Read threads with new posts" list.
    I'll fix that as soon as I'm on my Windows machine.
    Tell me, have you updated the PHP Sourcebans version on your website or something? That function used to work fine.

    Edited:

    Ah yes, there's been two sourcebans updates released since I last updated. Time to find out what they've done.
    I tried with the old PHP (The one that used to work) and the latest, both same.

    I also think you should buy me a cat.
    Reply With Quote Edit / Delete Reply Windows 7 United Kingdom Show Events Dumb Dumb x 1 (list)

  22. Post #102

    August 2011
    94 Posts
    I filled out both the sourcebans.lua config and created a file in autorun/server with sql details.

    sm_ban registers as a command.

    I ran "Lua_run require..." mysqloo and sourcebans are there. Whenever I type "sm_ban player time reason" it returns by saying that I do not have permission.

    Anyone else getting this error or know how to fix it?

  23. Post #103
    Gold Member
    Lexic's Avatar
    March 2009
    6,123 Posts
    I filled out both the sourcebans.lua config and created a file in autorun/server with sql details.

    sm_ban registers as a command.

    I ran "Lua_run require..." mysqloo and sourcebans are there. Whenever I type "sm_ban player time reason" it returns by saying that I do not have permission.

    Anyone else getting this error or know how to fix it?
    Have you set your server up as you would a normal sourcebans server on your sourcebans website and added yourself as an admin on it?

    Sorry guys - this thread keeps dropping off my "Read threads with new posts" list.
    I'll fix that as soon as I'm on my Windows machine.
    Tell me, have you updated the PHP Sourcebans version on your website or something? That function used to work fine.

    Edited:

    Ah yes, there's been two sourcebans updates released since I last updated. Time to find out what they've done.
    The updates don't seem to have done anything much, and I can't replicate this bug.
    centran, rokrox, Pantho, can you do some debugging for me please.
    Start up your server locked and in the base gamemode, and add a bot. Then read through the console to find anything that looks like an error and either paste it here or send it to me via PM.

  24. Post #104

    October 2011
    140 Posts
    It appears the admin list is never loaded.
    I never get the message that player has joined and they are admin message. In fact, I added an else after that code to double check it was getting called. I just printed out who connected and they where not an admin. That displayed fine.
    Then I tried to manually enter a steamID into the banning function to see if I could get something other then console showing up in sourcebans and I just got an error about being nil. So I know that steamID/admin was never loading into admins[]

    The problem might be with how we have sourcebans set up. However, I double checked that I was showing up as an admin for that server. I even played around with the flags even though that was supposed to be fixed.

    tl;dr admin list is not loading. how can I further debug this

    UPDATE:
    It appears the sql table join of admins to the server is not working. When I modified the query the entire admin list loaded fine. The banning admin showed on the sourcebans web portal. Looking into the table join problem.
    The grouping of servers does not work. An admin must be selected as admin of the server in sourcebans even if they are in the correct server group.

    tl;drX2 - You cannot use server grouping in sourcemod. Admins MUST be selected as ADMIN for a SERVER and not just in the server group.

  25. Post #105
    Gold Member
    Lexic's Avatar
    March 2009
    6,123 Posts
    Oh. I've never used server groups. How did you modify the query?

  26. Post #106

    October 2011
    140 Posts
    Oh. I've never used server groups. How did you modify the query?
    Code:
    SELECT a.aid, a.user, a.authid, a.srv_group, a.srv_flags, a.immunity FROM %s_admins a
    I just grabbed all admins. Right now I am looking over the SB database to figure out a query to grab admins in the correct group.

  27. Post #107
    Gold Member
    Lexic's Avatar
    March 2009
    6,123 Posts
    I suspect
    Code:
    SELECT authid, srv_password, (SELECT name FROM %s_srvgroups WHERE name = srv_group AND flags != '') AS srv_group, srv_flags, user, immunity  \
    FROM %s_admins_servers_groups AS asg \
    LEFT JOIN %s_admins AS a ON a.aid = asg.admin_id \
    WHERE %s server_id = %d  \
    OR srv_group_id = ANY (SELECT group_id FROM %s_servers_groups WHERE server_id = %d) \
    GROUP BY aid, authid, srv_password, srv_group, srv_flags, user
    might be a good place to start.
    I'll look into it in the morning.

    Edited:

    If you were wondering, it's in sourcebans.sp, line 990.
    	if(loadGroups && enableAdmins)
    	{
    		FormatEx(query,1024,"SELECT name, flags, immunity, groups_immune   \
    					FROM %s_srvgroups ORDER BY id",DatabasePrefix);
    		curLoading++;
    		SQL_TQuery(Database,GroupsDone,query);
    		
    #if defined DEBUG
    	LogToFile(logFile, "Fetching Group List");
    #endif
    		loadGroups = false;
    	}
    
    	if(loadAdmins && enableAdmins)
    	{
    		new String:queryLastLogin[50] = "";
    
    		if (requireSiteLogin)
    			queryLastLogin = "lastvisit IS NOT NULL AND lastvisit != '' AND";
    
    		if( serverID == -1 )
    		{
    			FormatEx(query,1024,"SELECT authid, srv_password, (SELECT name FROM %s_srvgroups WHERE name = srv_group AND flags != '') AS srv_group, srv_flags, user, immunity  \
    						FROM %s_admins_servers_groups AS asg \
    						LEFT JOIN %s_admins AS a ON a.aid = asg.admin_id \
    						WHERE %s (server_id = (SELECT sid FROM %s_servers WHERE ip = '%s' AND port = '%s' LIMIT 0,1)  \
    						OR srv_group_id = ANY (SELECT group_id FROM %s_servers_groups WHERE server_id = (SELECT sid FROM %s_servers WHERE ip = '%s' AND port = '%s' LIMIT 0,1))) \
    						GROUP BY aid, authid, srv_password, srv_group, srv_flags, user",
    					DatabasePrefix, DatabasePrefix,DatabasePrefix, queryLastLogin, DatabasePrefix, ServerIp, ServerPort,DatabasePrefix, DatabasePrefix, ServerIp, ServerPort);
    		}else{
    			FormatEx(query,1024,"SELECT authid, srv_password, (SELECT name FROM %s_srvgroups WHERE name = srv_group AND flags != '') AS srv_group, srv_flags, user, immunity  \
    						FROM %s_admins_servers_groups AS asg \
    						LEFT JOIN %s_admins AS a ON a.aid = asg.admin_id \
    						WHERE %s server_id = %d  \
    						OR srv_group_id = ANY (SELECT group_id FROM %s_servers_groups WHERE server_id = %d) \
    						GROUP BY aid, authid, srv_password, srv_group, srv_flags, user",
    					DatabasePrefix, DatabasePrefix,DatabasePrefix, queryLastLogin, serverID, DatabasePrefix, serverID);
    		}
    		curLoading++;
    		SQL_TQuery(Database,AdminsDone,query);
    
    Reply With Quote Edit / Delete Reply Windows 7 United Kingdom Show Events Lua King Lua King x 1 (list)

  28. Post #108

    October 2011
    140 Posts
    I came up with this for a query
    Code:
     ["Select Admins in Group"] = "SELECT a.aid, a.user, a.authid, a.srv_group, a.srv_flags, a.immunity FROM %s_admins a WHERE a.aid IN (SELECT z.admin_id FROM %s_admins_servers_groups z WHERE z.srv_group_id = (SELECT x.group_id FROM %s_servers_groups x WHERE x.server_id = %i))";
    tested the query statement and it seems to work. not sure how to implement it in your code.

  29. Post #109
    Gold Member
    Lexic's Avatar
    March 2009
    6,123 Posts
    Fiddle with line 210.
    You rated my earlier post dumb. You disagree with using the proven to work query written by the SourceBans team?

  30. Post #110

    October 2011
    140 Posts
    You rated my earlier post dumb.
    Must have misclicked pressing reply. sorry... what a dumb place to put the dumb button. lol

    I wouldn't worry too much about fixing this problem. I don't mind loading the entire admin list. Maybe just make a note that if you are using server groups that the admin name won't display in sourcebans unless you individually add the admins to that server.

  31. Post #111
    JamieH is a retarded bitch <3
    Pantho's Avatar
    July 2008
    2,211 Posts
    My issue fixed btw,

    I had over 400 admins in my admin list, now I've only got 31 it works fine.

  32. Post #112

    August 2011
    94 Posts
    Two questions:

    1 does this currently work 100%

    2: (may seem dumb) Do you fill out the sourcebans.lua config or the sourcebans_setup config in /autorun/server

  33. Post #113
    Gold Member
    Lexic's Avatar
    March 2009
    6,123 Posts
    It works 100% as long as you don't mind not using server groups to assign privilages or doing whatever obscene things Pantho likes to do to people's code.
    You should not need to modify the module itself at all, so the /autorun/server config is the one to change.

  34. Post #114
    CyberGmod Founder PropHuntv2 Home
    Phoenixf129's Avatar
    May 2009
    1,030 Posts
    Code:
    [12/11/11 21:30:15][SourceBans.lua] Loading Admins . . .
    [@lua\includes\modules\sourcebans.lua:295] bad argument #1 to 'find' (string expected, got nil)

  35. Post #115
    Gold Member
    Lexic's Avatar
    March 2009
    6,123 Posts
    fixed.
    Try to give your admins server groups :c

  36. Post #116
    CyberGmod Founder PropHuntv2 Home
    Phoenixf129's Avatar
    May 2009
    1,030 Posts
    fixed.
    Try to give your admins server groups :c
    That was quick :x

    Also, I want to overwrite ulx's ban with sm_ban, how would I do this?

    Edit:\\

    I also seem to be unable to rehash admins correctly (without having to restart the server). The admins i setup within sourcebans are not given 'instant access' on the server, until I restart it, or change the map.

  37. Post #117
    Gold Member
    Lexic's Avatar
    March 2009
    6,123 Posts
    sm_rehash giving you any errors?

  38. Post #118
    CyberGmod Founder PropHuntv2 Home
    Phoenixf129's Avatar
    May 2009
    1,030 Posts
    Code:
    [12/11/11 22:57:27][SourceBans.lua] Loading Admins . . .
    [12/11/11 22:57:27][SourceBans.lua] Loaded admin Phoenixf129 with group NO GROUP ASSIGNED.
    [12/11/11 22:57:27][SourceBans.lua] Loaded admin Manatee with group .
    Nope, just the debug.

  39. Post #119
    Gold Member
    Lexic's Avatar
    March 2009
    6,123 Posts
    As for ULX, I've never used it myself. Your best bet is to ask someone who knows about ULX and Lua to overwrite ULX.BanPlayer (or whatever it is) with sourcebans.BanPlayer. The ULX forums may be the best place for this. You will need to link them to this page.

    Edited:

    That's odd. Does the admin you added show up on the debug output but not have access?

  40. Post #120
    CyberGmod Founder PropHuntv2 Home
    Phoenixf129's Avatar
    May 2009
    1,030 Posts
    No he/she doesn't until I reboot the server, it doesn't even detect them :\

    EDIT:\\

    Infact, they appear on the debug when the rehash takes place, but don't get access to anything unless I reboot the server

    Added new admin:

    Code:
    [12/11/11 23:25:18][SourceBans.lua] Loaded admin Phoenixf129 with group NO GROUP ASSIGNED.
    [12/11/11 23:25:18][SourceBans.lua] Loaded admin Manatee with group .
    [12/11/11 23:25:18][SourceBans.lua] Loaded admin RoyMay with group .
    It detects him, but gives him no priv's.