Poll

Do You Like The New GUI Better?

Yes, Much Better!
71 (59.7%)
Yeah
22 (18.5%)
I Don't Care, I Use The Console
14 (11.8%)
No
4 (3.4%)
I Prefer The Old GUI
8 (6.7%)

Total Members Voted: 116

Author Topic: URestrict [Depreciated-author no longer supports]  (Read 465816 times)

0 Members and 1 Guest are viewing this topic.

Offline Aqua92

  • Newbie
  • *
  • Posts: 18
  • Karma: 0
Re: URestrict
« Reply #15 on: November 06, 2008, 07:00:07 AM »
i love you! really really great job! minge protect! :D

Offline RynO-SauruS

  • Jr. Member
  • **
  • Posts: 77
  • Karma: 17
Re: URestrict
« Reply #16 on: November 06, 2008, 09:36:47 AM »
This is very nice work. Great job! I now use this on my server... I love it...


YouTube music player by RynO-SauruS

Offline jay209015

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 934
  • Karma: 62
    • Dev-Solutions
Re: URestrict
« Reply #17 on: November 07, 2008, 09:24:08 AM »
Thank you very much.
An error only becomes a mistake when you refuse to correct it. --JFK

"And thus the downfall of the great ULX dynasty was wrought not by another dynasty, but the slow and steady deterioration of the leaders themselves, followed by the deprecation of the great knowledge they possessed." -Gmod, Chapter 28, verse 34 -- Stickly

Issun

  • Guest
Re: URestrict
« Reply #18 on: November 11, 2008, 04:03:20 AM »
Is it possible that this becomes compatible with UTeam groups? This would be so much easier to use if it could be applied to our UTeam ranks instead of the Users.txt ranks.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: URestrict
« Reply #19 on: November 11, 2008, 06:55:32 PM »
Is it possible that this becomes compatible with UTeam groups? This would be so much easier to use if it could be applied to our UTeam ranks instead of the Users.txt ranks.
UTeam relies on ULib groups.
URestrict relies on ULib groups.
I'm not sure how you can get more compatible than that.
If you mean use the 'team' names you've specified in UTeam, though it could be done...why? It would just complicate the code.
Not everyone uses UTeam here, but, most here use ULib/ULX
I'm not speaking for Jay, so he might/could do it, but, I personally don't see a good reason why he should. :)

"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline jay209015

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 934
  • Karma: 62
    • Dev-Solutions
Re: URestrict
« Reply #20 on: November 11, 2008, 09:11:18 PM »
Agree 100% with you on this on Jamm
An error only becomes a mistake when you refuse to correct it. --JFK

"And thus the downfall of the great ULX dynasty was wrought not by another dynasty, but the slow and steady deterioration of the leaders themselves, followed by the deprecation of the great knowledge they possessed." -Gmod, Chapter 28, verse 34 -- Stickly

Lazy_Frostyfrog

  • Guest
Re: URestrict
« Reply #21 on: November 20, 2008, 12:29:19 PM »
I think I have found a few bugs with this script.
  • Groups list doesn't contain all of the ulib groups
  • groups that have 3 or less letters in the name (ex. vip) don't work
other-wise, great script. although those fixes would help alot. Also, could you make it so the "allow admin" would do something like if (player:IsAdmin and [players' group == allowed]) ect.?

Offline jay209015

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 934
  • Karma: 62
    • Dev-Solutions
Re: URestrict
« Reply #22 on: November 20, 2008, 05:52:43 PM »
Quote
Groups list doesn't contain all of the ulib groups
     - You can only see the groups that ULib passes to clients on connect through ULib.ucl.groups
Quote
groups that have 3 or less letters in the name (ex. vip) don't work
     - Strange, I'll look into this further.
Quote
other-wise, great script. although those fixes would help alot. Also, could you make it so the "allow admin" would do something like if (player:IsAdmin and [players' group == allowed]) ect.?
     - Thanks for the compliment, but I don't understand your reasoninge behind:
Code: [Select]
if (player:IsAdmin and [players' group == allowed]) Seems kind of pointless.
An error only becomes a mistake when you refuse to correct it. --JFK

"And thus the downfall of the great ULX dynasty was wrought not by another dynasty, but the slow and steady deterioration of the leaders themselves, followed by the deprecation of the great knowledge they possessed." -Gmod, Chapter 28, verse 34 -- Stickly

Offline Frostyfrog

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: URestrict
« Reply #23 on: November 21, 2008, 02:47:21 PM »
Quote

Quote
Groups list doesn't contain all of the ulib groups
     - You can only see the groups that ULib passes to clients on connect through ULib.ucl.groups
Well, let me explain a little bit of what was happening...
The owner (Paws) was in the group Paws (I was doing it that way, since I'm the "extras" lua coder, for UTeams) and he was on the server before I was. Then I joined and brought up the URestrict menu. (I only needed the STOOL restriction) The group Paws wasn't on there yet the groups Frosty, Admin, superadmin, ect. were there.
Quote
Quote
groups that have 3 or less letters in the name (ex. vip) don't work
     - Strange, I'll look into this further.
vip wouldn't work so I changed it to vips and it worked.
Quote
Quote
other-wise, great script. although those fixes would help alot. Also, could you make it so the "allow admin" would do something like if (player:IsAdmin and [players' group == allowed]) ect.?
     - Thanks for the compliment, but I don't understand your reasoninge behind:
Code: [Select]
if (player:IsAdmin and [players' group == allowed]) Seems kind of pointless.
something like this (different though since you did it with files):
Code: [Select]
local adminAllowed = 1
local sadminAllowed = 1
local vipAllowed = 1
if (player:IsAdmin and adminAllowed == 1 or player:IsSuperAdmin and sadminAllowed == 1 or player:IsUserGroup("vip") and vipAllowed == 1 ) then
(code here)
end



Offline jay209015

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 934
  • Karma: 62
    • Dev-Solutions
Re: URestrict
« Reply #24 on: November 22, 2008, 06:18:42 AM »
something like this (different though since you did it with files):

Code: [Select]
local adminAllowed = 1
local sadminAllowed = 1
local vipAllowed = 1
if (player:IsAdmin and adminAllowed == 1 or player:IsSuperAdmin and sadminAllowed == 1 or player:IsUserGroup("vip") and vipAllowed == 1 ) then
(code here)
end


I still don't see the purpose of this, because the script determines whether or not to allow the use of a tool by seeing if the players group is in the allowed list a the tool at question:
Code: [Select]
if not(table.HasValue( URestrict[ v ], URestrict.GetUserGroup( ply ))) and ( #URestrict[ v ] > 0 ) then
Why do you want me to change this, perhaps that way I can better understand what your want.
An error only becomes a mistake when you refuse to correct it. --JFK

"And thus the downfall of the great ULX dynasty was wrought not by another dynasty, but the slow and steady deterioration of the leaders themselves, followed by the deprecation of the great knowledge they possessed." -Gmod, Chapter 28, verse 34 -- Stickly

Offline Frostyfrog

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: URestrict
« Reply #25 on: November 28, 2008, 02:42:30 PM »
well, I was thinking of having Admins (or just Super Admins) get the ability to ALWAYS use everything, since I have a few groups which are not those too groups, don't show up on the list, and are counted as admins.

Offline jay209015

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 934
  • Karma: 62
    • Dev-Solutions
Re: URestrict
« Reply #26 on: November 28, 2008, 09:19:13 PM »
Quote
well, I was thinking of having Admins (or just Super Admins) get the ability to ALWAYS use everything
     - By default, everyone has the ability to use every until specified other-wise.
Quote
since I have a few groups which are not those too groups, don't show up on the list, and are counted as admins.
     - I will be working on this very soon, I'm just kind of in a crunch for free time between work and school.

-To JamminR or Megiddo:
     Is there already a full list of all the groups on the server sent to the client? Right now I'm using ULib.ucl.groups client side to build
the guis, but it's not the full list. Is there any other way to get the full list to the client without sending another umsg?
An error only becomes a mistake when you refuse to correct it. --JFK

"And thus the downfall of the great ULX dynasty was wrought not by another dynasty, but the slow and steady deterioration of the leaders themselves, followed by the deprecation of the great knowledge they possessed." -Gmod, Chapter 28, verse 34 -- Stickly

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: URestrict
« Reply #27 on: November 29, 2008, 12:22:07 PM »
-To JamminR or Megiddo:
     Is there already a full list of all the groups on the server sent to the client? Right now I'm using ULib.ucl.groups client side to build
the guis, but it's not the full list. Is there any other way to get the full list to the client without sending another umsg?

Jay, I'm not sure what/why you're not seeing list of full groups.
Though I didn't try removing myself as a superadmin (perhaps 'guest' USER groups don't see upper groups), I ran
Code: [Select]
lua_run_cl PrintTable(ULib.ucl.groups)
and saw every group my server had in it's groups.txt file, along with allows/denys.

If you're not seeing that on client side, I can only think of two things why;
1) Like I said above, perhaps you don't see the full list of groups if access isn't high enough.
I doubt #1 personally.
2) Your script initializes before ULib sends down the groups? From what I can tell looking at our sh_ucl.lua, the 'user' joining gets his groups set before the 'public' information is added to the rest.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Hardy

  • Newbie
  • *
  • Posts: 42
  • Karma: 0
Re: URestrict
« Reply #28 on: November 30, 2008, 02:25:16 PM »
How about SWEPs and SENTs restriction, not only tools?

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: URestrict
« Reply #29 on: November 30, 2008, 02:39:47 PM »
How about SWEPs and SENTs restriction, not only tools?
Not sure about ents, pretty sure it could be added if he finds time.
As for SWEPS, wouldn't the Loadout tab, which controls WEaPonS, work for Scripted WEaPonS (SWEPS) too?
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming