• Print

Author Topic: Ulx userallow(id) fails if user isn't in a group  (Read 5830 times)

0 Members and 1 Guest are viewing this topic.

Offline jakej78b

  • Newbie
  • *
  • Posts: 26
  • Karma: 4
Ulx userallow(id) fails if user isn't in a group
« on: August 13, 2014, 05:54:38 pm »
I had some issues with this while experimenting with a donation script, and when I went in-game to manually add the user's privileges it replied something like "No user with this steamid exists in the ULib database" and I found that odd, is this an intended feature, or just something that hasn't been patched up yet? I had a temporary fix by making a group called donor to place all donors in, but that seems like a bit of a hassle just for granting additional permissions to a single user.

Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1270
  • Karma: 164
  • What even IS software anymore?
    • XGUI
Re: Ulx userallow(id) fails if user isn't in a group
« Reply #1 on: August 15, 2014, 10:44:59 am »
The reason is that ULib does not store users in the default "user" group in groups.txt, and if you try to do allowuserid, it errors on the condition that the steamID is not a current ULib user (as giving someone with group "user" some extra permissions doesn't happen often). We may change it, but for now, you can just call ULib.ucl.addUser directly:

Code: Lua
  1. ULib.ucl.addUser( "STEAM_0:1:123", nil, nil, "user" )

.. This will add them to the users.txt file. Then you can run the ulx allowuserid command with no issues.

Hope this helps!
Join our Team Ulysses community discord! https://discord.gg/gR4Uye6

Offline jakej78b

  • Newbie
  • *
  • Posts: 26
  • Karma: 4
Re: Ulx userallow(id) fails if user isn't in a group
« Reply #2 on: August 15, 2014, 04:19:22 pm »
Alright, that will make things a little more easy, I'll look up in the wiki what the userallow ULib thing is. Thanks for the help.

Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1270
  • Karma: 164
  • What even IS software anymore?
    • XGUI
Re: Ulx userallow(id) fails if user isn't in a group
« Reply #3 on: August 16, 2014, 10:20:59 am »
You can actually specify the allows using the second parameter in addUser, to save you a second step of work :P
Join our Team Ulysses community discord! https://discord.gg/gR4Uye6

  • Print