ULX

Author Topic: ULX failing to add people to groups?  (Read 2180 times)

0 Members and 2 Guests are viewing this topic.

Offline Jerpy

  • Newbie
  • *
  • Posts: 21
  • Karma: 2
ULX failing to add people to groups?
« on: January 27, 2015, 11:31:00 AM »
I have no idea why this is happening. It's not an issue with my ulx sbans integration. It's been working fine since I've installed it. I've tried to backtrack my steps and think of what I've installed since this broke itself, but I only knew of two things and neither of those were conflicting.
The issue: So basically, sbans has been working for me and it's been adding people to the appropriate groups in-game. Suddenly one day it decides to no longer do so.
-It is not a DB issue
   -I tested so with bans, both are readable and writable from in-game and web.
   -It states that it was successfully connected to the db in my console.log
-There are no addons conflicting with it
   -Like I said, I backtracked my steps and there seems to be nothing, also no errors are coming up regardless

I have really just slimmed this down to something I could have messed up in ULX, because thats the final point where it stops in the steps. In the log, sourcebans states that it has successfully loaded and then loads all admin groups with admins, and states what group they are in. This is when it adds them or keeps them there because it detected them, but the addition of the admin to the group itself is no longer happening. For an example of what this looks like, here:
[01/27/15 13:07:08][SourceBans.lua] Loaded admin Jerpy with group superadmin.
It does this for all admins assigned (besides saying superadmin, of course) and it completes the command, but it stops at attempting to add them to the ULX group. No errors, nothing else. I'm at a dead end here and I probably won't even get any help on this, but I figured it was worth a shot to post in here and see because I'm really out of luck with this happening.
« Last Edit: January 27, 2015, 11:37:42 AM by Jerpy »

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: ULX failing to add people to groups?
« Reply #1 on: January 27, 2015, 04:09:10 PM »
Few questions first:
Do you personally think it has to do with sbans?
What type of modules (addons) do you have working with ULX (such like apromote)?
How many users are on a daily basis?

Secondly, can you upload or share your groups.txt and users.txt, so we can diagnose your issue, a little better. It's possible that ulx (ulib) had formatted the users.txt incorrectly, and it's possible it will no longer put users in the text file correctly if something went wrong. If you want also, you can also try renaming your users.txt and group.txt to like users_original.txt, and group_original.txt, so ulx will make a new file, and see if it works again.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Jerpy

  • Newbie
  • *
  • Posts: 21
  • Karma: 2
Re: ULX failing to add people to groups?
« Reply #2 on: January 28, 2015, 08:35:42 AM »
Few questions first:
Do you personally think it has to do with sbans?
What type of modules (addons) do you have working with ULX (such like apromote)?
How many users are on a daily basis?

Secondly, can you upload or share your groups.txt and users.txt, so we can diagnose your issue, a little better. It's possible that ulx (ulib) had formatted the users.txt incorrectly, and it's possible it will no longer put users in the text file correctly if something went wrong. If you want also, you can also try renaming your users.txt and group.txt to like users_original.txt, and group_original.txt, so ulx will make a new file, and see if it works again.

No, I do not think it has to do with sbans. I got the module working 100% and technically it still works 100%, but there is something missing in the process here when it tries to add someone to a group. I really want to say it's not sbans, because I'm finding 0 issues with the module itself. The only thing it's having (but not showing) is a problem communicating with ULX as far as I know. Users are still able to be added, manually and automatically so I do not believe it is an issue with users.txt and groups.txt - I looked into them and everything is there except for an alt steam account of mine that I'm testing this with, and I attempted to add him to the group via sbans. He's not in there, of course.
Automated group adds still work, as I have the script that checks if a user is in a steam group, and if they are it adds them to 'member'

I should mention (you probably already know this) - The certain sbans module I'm using is integrated directly into ulx. It's about 3 different scripts placed in different spots in the ulx folder, as instructed by the creator of it. It worked fine up until randomly a few days ago as I've said.

I think this answers most of your questions other than 'how many users are on, on a daily basis' - If you mean across all servers, because technically thats how the sbans integration works. If we're talking traffic, probably ~100 new users each day. If you mean how much do the servers usually hold on average; Well, one maxes at 30, and another at 36. The 30 server usually averages ~25-30 most of the day, and the 36 is about the same idea: 30-36.
« Last Edit: January 28, 2015, 08:38:20 AM by Jerpy »

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: ULX failing to add people to groups?
« Reply #3 on: January 28, 2015, 08:04:24 PM »
I really want to say it's not sbans, because I'm finding 0 issues with the module itself. The only thing it's having (but not showing) is a problem communicating with ULX as far as I know. Users are still able to be added, manually and automatically so I do not believe it is an issue with users.txt and groups.txt

I probably should of asked, when you mean communicating, you mean like when you add users to a certain group, and they don't appear in the group on ulx, but do appear in the users.txt file?
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Jerpy

  • Newbie
  • *
  • Posts: 21
  • Karma: 2
Re: ULX failing to add people to groups?
« Reply #4 on: February 06, 2015, 08:19:56 PM »
Sorry I have not replied to this in a while. I've been busy. What I mean by communicating is when the sbans script attempts to call something to add the user to the group, such as running a console command to add them to the group.
sourcebans.lua is a very large script, but here is one of the few chunks that controls adding the admins to their group.
Code: [Select]
function adminLoaderOnSuccess(self)
    notifymessage("Finished loading admins!");
    for _, ply in pairs(player.GetAll()) do
        local info = admins[ply:SteamID()];
        if (info) then
            if (config.dogroups) then
                ply:SetUserGroup(string.lower(info.srv_group))
            end
            ply.sourcebansinfo = info;
            notifymessage(ply:Name() .. " is now a " .. info.srv_group .. "!");
        end
    end
end
Like I said, originally everything was working just fine up until some random point in time. But, it wouldn't hurt to look at this to see if anything is wrong. All groups are spelled and capitalized correctly, so it would not have an issue adding them by reading strings. Infact, if it did have a problem like that, it would print errors.
This is what we're focusing on though: ply:SetUserGroup(string.lower(info.srv_group))
Is that 100% correct? It should be using ply:SetUserGroup - Are there any other variations that would be working for this kind of automated addition?
Hope this info helped.