ULX

Author Topic: DarkRP + ULX = FIXED  (Read 29350 times)

0 Members and 1 Guest are viewing this topic.

Offline hymsan

  • Newbie
  • *
  • Posts: 28
  • Karma: 2
DarkRP + ULX = FIXED
« on: January 20, 2011, 12:51:02 PM »
----------
« Last Edit: September 21, 2013, 03:28:46 AM by hymsan »

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: DarkRP + ULX = Broken?
« Reply #1 on: January 20, 2011, 03:59:48 PM »
There's honestly nothing we can do to help you on this issue. Sorry! I'll try to talk to the DarkRP author and see if we can't come to some compromise for future revisions.
Experiencing God's grace one day at a time.

Offline hymsan

  • Newbie
  • *
  • Posts: 28
  • Karma: 2
Re: DarkRP + ULX = Broken?
« Reply #2 on: January 22, 2011, 03:58:40 AM »
After toying around for hours, I did quite a few restarts, about 30. And it suddenly started to work. Not sure what the issue was, and can't seem to replicate the issue.

Offline Cybercub

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
    • My server website
Re: DarkRP + ULX = Broken?
« Reply #3 on: January 22, 2011, 04:33:25 PM »
I wish i knew what u did to fix it, I have the same problem.. :(
Cartoon network STINKS now... It was nice as it lasted.

Offline FPtje

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: DarkRP + ULX = Broken?
« Reply #4 on: January 23, 2011, 02:53:20 AM »
I've had several people report this to me. Yet I have had other people reporting to me that it works fine.

I have reasons to believe ASSmod fucks it all up. A guy named Caesar fixed all ULX/FAdmin problems by getting rid of ASSmod.

This is an important question: Did you make the people admin through ULX or FAdmin?
(did you use ULX adduser ... or did you use SetAccess in the FAdmin menu?)

Offline hymsan

  • Newbie
  • *
  • Posts: 28
  • Karma: 2
Re: DarkRP + ULX = Broken?
« Reply #5 on: January 23, 2011, 02:21:22 PM »
I've had several people report this to me. Yet I have had other people reporting to me that it works fine.

I have reasons to believe ASSmod fucks it all up. A guy named Caesar fixed all ULX/FAdmin problems by getting rid of ASSmod.

This is an important question: Did you make the people admin through ULX or FAdmin?
(did you use ULX adduser ... or did you use SetAccess in the FAdmin menu?)

Hey Falco,

I'm the same guy who has the topic open on your issues list on googlecode. The problem is still with ULX and Fadmin, in the access files of FAdmin.

I don't have assmod installed, never had it installed.

And I used ULX adduser, Considering I do not have a FAdmin SetAcess anymore, I removed the files.

EDIT: Also I appreciate what you have done with the gamemode, and all the time you spend on it. But I wish you would have added a variable to disabled FAdmin entirely, Personally I don't see a reason to package a admin mod with a gamemode.

I wish i knew what u did to fix it, I have the same problem.. :(

The only way at the moment to fix seems to be to delete the Access directory in FAdmin. But then your Civil Protection don't spawn with stunsticks or anything, because they can't receive permissions. I recommend waiting for a fix.
« Last Edit: January 23, 2011, 04:38:14 PM by hymsan »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: DarkRP + ULX = Broken?
« Reply #6 on: January 23, 2011, 04:16:22 PM »
FPtje, good to see you.
As you review/have reviewed our forums, you will possibly notice the general distaste we have against DarkRP.
You may already, but just so we're clear, please realise that this isn't a distaste towards you, but the general mess of versions/authors and combo exploits (mod x + DarkRP version y = exploit z, etc) that DarkRP has seeminly become over the years.

Good luck cleaning it up.

Hymsan,
It's possible he needed an admin mod for it due to the fact ULX originally wouldn't work well with DarkRP at all, and to be honest, we weren't in a hurry to fix it due to so many different version hacks of DarkRP existing. Though he's trying to correct that, it seems DarkRP has had 10 major authors over the past 5 years, with probably every other person who thinks they can program in Lua and Glua hacking at it on thier own.
I'll let him speak to that on his own though, but that is my theory.

« Last Edit: January 23, 2011, 04:21:44 PM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline hymsan

  • Newbie
  • *
  • Posts: 28
  • Karma: 2
Re: DarkRP + ULX = Broken?
« Reply #7 on: January 23, 2011, 04:36:06 PM »
FPtje, good to see you.
As you review/have reviewed our forums, you will possibly notice the general distaste we have against DarkRP.
You may already, but just so we're clear, please realise that this isn't a distaste towards you, but the general mess of versions/authors and combo exploits (mod x + DarkRP version y = exploit z, etc) that DarkRP has seeminly become over the years.

Good luck cleaning it up.

Hymsan,
It's possible he needed an admin mod for it due to the fact ULX originally wouldn't work well with DarkRP at all, and to be honest, we weren't in a hurry to fix it due to so many different version hacks of DarkRP existing. Though he's trying to correct that, it seems DarkRP has had 10 major authors over the past 5 years, with probably every other person who thinks they can program in Lua and Glua hacking at it on thier own.
I'll let him speak to that on his own though, but that is my theory.

DarkRP is quite stable, at least for the months I've been running it. If you keep it up-to-date, you shouldn't have any issues. But the admin mod, it basically is controlled by the scoreboard, which I have disabled so I can use Sui_Scoreboard, simply because it fits my taste. Personally I would love an option just to disable FAdmin.

And I have to admit, Falco has done a great job keeping up with bugs, so everything gets fixed timely.

Offline hymsan

  • Newbie
  • *
  • Posts: 28
  • Karma: 2
Re: DarkRP + ULX = Broken?
« Reply #8 on: January 25, 2011, 08:46:40 AM »
Sorry for the double post, Found the fix for DarkRP and ULX.

You have to add yourself to superadmin on both ULX and FAdmin, or in our case, You have to create a group in Fadmin called owner, and add yourself to it, and to ULX owner group.

For some reason FAdmin is overriding ulx's access functions, so basically.

Enter your rcon password,
then:
rcon ulx adduser "name" "group"
rcon FAdmin SetAccess "name" "group"

You may then use admin, 24/7.
« Last Edit: January 25, 2011, 08:49:02 AM by hymsan »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: DarkRP + ULX = FIXED
« Reply #9 on: January 25, 2011, 02:38:13 PM »
Superadmin, by default, is the highest access Gmod comes with.
Gmod has two admin checks by default, IsAdmin and IsSuperadmin. 99% of Sents and other 'admin check access' scripts use those.
Yes, Garry created IsUserGroup, but that was for developers, and wouldn't necessarily mean 'does this person have admin rights of any kind'
Therefore, ULX uses superadmin by default as the highest group.

Are you saying DarkRP has it's own group ("owner"), and expects all other scripts that do admin checks to know that "owner" = a high admin?
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline hymsan

  • Newbie
  • *
  • Posts: 28
  • Karma: 2
Re: DarkRP + ULX = FIXED
« Reply #10 on: January 25, 2011, 09:04:36 PM »
Superadmin, by default, is the highest access Gmod comes with.
Gmod has two admin checks by default, IsAdmin and IsSuperadmin. 99% of Sents and other 'admin check access' scripts use those.
Yes, Garry created IsUserGroup, but that was for developers, and wouldn't necessarily mean 'does this person have admin rights of any kind'
Therefore, ULX uses superadmin by default as the highest group.

Are you saying DarkRP has it's own group ("owner"), and expects all other scripts that do admin checks to know that "owner" = a high admin?

No, not at all. I said "in our case" meaning my server, I should have been more descriptive.

Make yourself superadmin if you don't have custom administrator groups, if you DO have a custom administrator group, you may have to add the same custom group into FAdmin in Darkrp, Or just use superadmin for everthing, and admin for everything else.

Either way, they do seem compatible.

Offline FPtje

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: DarkRP + ULX = FIXED
« Reply #11 on: February 04, 2011, 04:08:18 AM »
I managed to replicate this problem on my computer. This is what I see:

> Ulx adduser bot superadmin
All works well and this is put into ULib\users.txt

Code: [Select]
"BOT"
{
"deny"
{
}
"name" "Bot03"
"allow"
{
}
"group" "superadmin"
}

Then I change level or let the bot rejoin, ULib ALTERS the file to look like this:
Code: [Select]
"BOT"
{
"deny"
{
}
"group" "user"
"name" "Bot02"
"allow"
{
}
}

FAdmin does not in any way mess with the users.txt file. Why does ULib override its own users file with incorrect settings or how can FAdmin be changing these settings?
« Last Edit: February 04, 2011, 04:14:52 AM by FPtje »

Offline FPtje

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: DarkRP + ULX = FIXED
« Reply #12 on: February 04, 2011, 04:20:21 AM »
I just commented out this code for a test (it's in FAdmin)
Code: [Select]
--ULX compatibility!
timer.Simple(0, function()
if ULib and ULib.ucl then
function _R.Player:GetUserGroup()
local uid = self:UniqueID()
if CLIENT and MaxPlayers() == 1 and self:Ping() == 0 then -- Probably single player
uid = "1" -- Fix garry's bug
end
if not ULib.ucl.authed[ uid ] then if ULib.ucl.probe then ULib.ucl.probe(self) end end-- return FAdmin.Access.Groups[self:GetNWString("usergroup")] and FAdmin.Access.ADMIN[FAdmin.Access.Groups[self:GetNWString("usergroup")].ADMIN] end
return (ULib.ucl.authed[ uid ] and ULib.ucl.authed[ uid ].group) or "user"
end
end
end)

Now I get these errors:
Code: [Select]
ERROR: Hook 'UTeamSpawnAuth' Failed: [addons\ulx\lua\ulx\modules\uteam.lua:23] attempt to index field '?' (a nil value)
Removing Hook 'UTeamSpawnAuth'

when I then START typing "ulx adduser" I get this AND when I press enter when doing "ulx adduser bot superadmin" I get this serverside:
Code: [Select]
[@addons\ulib\lua\ulib\shared\commands.lua:444] Group does not exist ()

That is because ply:GetUserGroup returns an EMPTY string. In this case nor DarkRP nor FAdmin is overriding ply:GetUserGroup. (I commented it out as a test)


sh_ucl:283, latest revision as of today:
Code: [Select]
function meta:GetUserGroup()
local uid = self:UniqueID()
if CLIENT and SinglePlayer() then
uid = "1" -- Fix garry's bug
end
if not ucl.authed[ uid ] then return "" end -- PROBLEM LIES HERE, replace "" with self:GetNWString("usergroup") to fix it!
return ucl.authed[ uid ].group or "user"
end

Return ply:GetNWString("usergroup") if ULib doesn't happen to have it in its database. If you set the group with another admin mod, ULib won't have it in its database and will return a false empty usergroup. Fix that and it WILL fix the errors with DarkRP when my "ULX fix" is removed.



Here's the deal:
With the above fix the player's access is saved in ULX. However if the access is set in FAdmin, ULX will somehow take the group from FAdmin. So if the user is set to "user" through FAdmin, and to superadmin in ULX, the player will be user.


But hey at least ULib doesn't change its own files anymore.
« Last Edit: February 04, 2011, 04:43:24 AM by FPtje »

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given