ULX

Author Topic: Echo Admin Commands to Admins only  (Read 12874 times)

0 Members and 1 Guest are viewing this topic.

Offline nathan736

  • Full Member
  • ***
  • Posts: 143
  • Karma: 4
Re: Echo Admin Commands to Admins only
« Reply #15 on: February 14, 2013, 10:49:19 AM »
why not just add a config seting so people can set it but it defaults to the old thing so nothing changes if people don't do it

2 - Anonymous outputs to players with out access to see a predefined name to see when a admin uses a command  instead of "(someone)" they would see "(your String here)" slaped bob for 0 damage.

 you would see  (in code) "(".. ulx.echoword .. ")" .. string
a person asked me how to code lua and i said this " its like building a rocket up side down then  realizing you did it all wrong."

Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1264
  • Karma: 166
  • open(my $file, "<README") or die;
    • XGUI
Re: Echo Admin Commands to Admins only
« Reply #16 on: February 14, 2013, 12:30:57 PM »
Would it not be easier/more backwards compatible for us to just 'add' the option.
Leave current 0,1,2 as is, and add the option 3?

I brought this up with Megiddo when I first asked him about this, he said that having the configuration in the proper order would be less confusing in the long run. We'll obviously have to make a prominent note about it, however.
"The stupidity of an individual on the Internet is generally matched only the by size of their ego, unless the individual in question is unaware of both." - Me

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 7951
  • Karma: 373
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Echo Admin Commands to Admins only
« Reply #17 on: February 14, 2013, 02:13:44 PM »
Harumph, I'm just gonna call Megiddo mini-Gar...uh, nah, he's NEVER that bad.
The price one pays for pursuing any profession or calling is an intimate knowledge of its ugly side. - James Baldwin

Offline mikey

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
Re: Echo Admin Commands to Admins only
« Reply #18 on: February 15, 2013, 04:57:40 AM »
I really really really appreciate it :)

Offline nathan736

  • Full Member
  • ***
  • Posts: 143
  • Karma: 4
Re: Echo Admin Commands to Admins only
« Reply #19 on: February 18, 2013, 09:00:22 AM »
did a modification to add the ability to set a convar in config.txt https://github.com/nathan736/Ulysses/tree/patch-1/ulx
this is not a stand alone this patches the stock ulx code
-warning this may not work-
« Last Edit: February 18, 2013, 09:35:37 AM by nathan736 »
a person asked me how to code lua and i said this " its like building a rocket up side down then  realizing you did it all wrong."

Offline mikey

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
Re: Echo Admin Commands to Admins only
« Reply #20 on: February 25, 2013, 12:40:16 AM »
did a modification to add the ability to set a convar in config.txt https://github.com/nathan736/Ulysses/tree/patch-1/ulx
this is not a stand alone this patches the stock ulx code
-warning this may not work-
this isn't what I was asking for  :'(

Offline nathan736

  • Full Member
  • ***
  • Posts: 143
  • Karma: 4
Re: Echo Admin Commands to Admins only
« Reply #21 on: February 25, 2013, 07:06:38 AM »
https://github.com/Nayruden/Ulysses/blob/master/ulx/lua/ulx/log.lua#L351
change someone to what ever you want in that dir and your set, what did you want then ?
« Last Edit: February 25, 2013, 07:12:13 AM by nathan736 »
a person asked me how to code lua and i said this " its like building a rocket up side down then  realizing you did it all wrong."

Offline mikey

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
Re: Echo Admin Commands to Admins only
« Reply #22 on: February 25, 2013, 11:48:27 AM »
https://github.com/Nayruden/Ulysses/blob/master/ulx/lua/ulx/log.lua#L351
change someone to what ever you want in that dir and your set, what did you want then ?
Instead of it saying (Someone) to all the players, it just doesn't echo to anybody BUT admins.

Offline nathan736

  • Full Member
  • ***
  • Posts: 143
  • Karma: 4
Re: Echo Admin Commands to Admins only
« Reply #23 on: February 26, 2013, 08:27:09 AM »
k ill see if i can figure it out
a person asked me how to code lua and i said this " its like building a rocket up side down then  realizing you did it all wrong."

Offline okiedoke

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
Re: Echo Admin Commands to Admins only
« Reply #24 on: August 21, 2013, 12:26:41 AM »
Hi guys,

I hate bumping new threads but on this occasion I feel I need to.

Can I just ask if this was ever completed? We have an extensive structure of staff within our community.

We currently have the owner who is 'superadmin', we also have 'founder', 'co-owner' and 'headadmin' that are all inherited with slight variations from 'sadmin' (senior admin). 'sadmin' inherits from 'admin' and intern goes from 'tadmin' (trial admin).

We would ideally like to be able to have ULX echo all admin commands used but so only 'sadmin' and higher can see the echoes.
We don't want 'admin' and lower to see the echoes as we don't actually want them to know we can see them.

Brief bit of background to understand why - there is a culture where some of our admins kick or slay during TTT rounds for sometimes very petty reasons often because the admin was a T and they got killed. The owner is not on very often so getting him to check server logs is difficult and we would like to be able to deal with this quickly when he isn't online.

Me and him have agreed if we can get this working he'll implement it. To be honest, I'm quite the Lua junkie, I can edit the code with a basic understanding of what I'm changing but no good at new code. If someone could simply tell me where the Lua checks to see what usergroup they are in when it echoes and I'm sure I could do the rest.

Thanks!

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6199
  • Karma: 394
  • Project Lead
Re: Echo Admin Commands to Admins only
« Reply #25 on: August 21, 2013, 04:42:36 AM »
It has not been done yet. The code for logging is in logs.lua. You'll want to look near the end of the file.
Experiencing God's grace one day at a time.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 7951
  • Karma: 373
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Echo Admin Commands to Admins only
« Reply #26 on: August 21, 2013, 01:56:37 PM »
I believe we have a group flag for seeing console log functions.
Don't we?
Maybe not. It's been too long for me since I looked at our groups.
Maybe I'm thinking the seeasay with operators.
The price one pays for pursuing any profession or calling is an intimate knowledge of its ugly side. - James Baldwin

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6199
  • Karma: 394
  • Project Lead
Re: Echo Admin Commands to Admins only
« Reply #27 on: August 21, 2013, 05:17:41 PM »
You might be thinking of the permission that lets you see who used commands when logging is set to anonymous mode.
Experiencing God's grace one day at a time.

Offline okiedoke

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
Re: Echo Admin Commands to Admins only
« Reply #28 on: August 22, 2013, 12:28:05 PM »
You might be thinking of the permission that lets you see who used commands when logging is set to anonymous mode.

That is pretty much what I want. So our higher admins can see every command our lower admins are doing without anybody else seeing the echo.

I see this in log.lua on line 21 and 22:

Code: [Select]
local seeanonymousechoAccess = "ulx seeanonymousechoes"
ULib.ucl.registerAccess( seeanonymousechoAccess, ULib.ACCESS_ADMIN, "Ability to see who uses a command even with ulx logEcho set to 1", "Other" )

Now the ability to change ULib.ACCESS_ADMIN to a custom usergroup and being able to change it to work when echo is set to 0 would be PERFECT.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6199
  • Karma: 394
  • Project Lead
Re: Echo Admin Commands to Admins only
« Reply #29 on: August 22, 2013, 03:57:51 PM »
Now the ability to change ULib.ACCESS_ADMIN to a custom usergroup
It's just a standard access tag.

being able to change it to work when echo is set to 0 would be PERFECT.
It's not a simple change, but it's one that you should be able to accomplish given basic Lua experience and an hour of time.
Experiencing God's grace one day at a time.