Author Topic: (Someone) did something to whoever  (Read 4405 times)

0 Members and 1 Guest are viewing this topic.

Offline jojothemitchellinman

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
(Someone) did something to whoever
« on: February 28, 2016, 08:49:41 PM »
I am hosting a garry's mod server and I am using ULX, but I have found a problem for reporting staff abuse. In order to ban staff, the poster needs to prove they are telling the truth with screenshots, but when an admin uses a command that isn't silent it comes up for normal users and donators as (Someone) did whatever. How do I change the (someone) to the admin's name?

Offline feldma

  • Newbie
  • *
  • Posts: 47
  • Karma: 5
  • 5696 hours in Gmod and counting!
    • Mega-Strike Network
Re: (Someone) did something to whoever
« Reply #1 on: February 28, 2016, 09:52:44 PM »
It's a setting you can change.

I think it's in the ulx menu -> settings -> server -> ulx general -> "echo admin commands".

Change that to whichever one says about the admin name.
Solving 50% of people's questions by searching it up on google.

Trying to think of a cool idea to code, so I can inspire myself to code. If you want something done, please message me!

Offline Timmy

  • Ulysses Team Member
  • Sr. Member
  • *****
  • Posts: 252
  • Karma: 168
  • Code monkey
Re: (Someone) did something to whoever
« Reply #2 on: February 28, 2016, 09:53:22 PM »
Server console
Use the "ulx logecho" console variable to control how ULX echoes commands.

There's 3 different modes:
Code: [Select]
0 - OFF No output to any players when an admin command is used
1 - ANONYMOUS Output to players without access to see who used the command (admins by default) similar to "(Someone) slapped Bob with 0 damage"
2 - FULL Output to players similar to "Foo slapped Bob with 0 damage"

In this case you'd set it to 2. So you would run:
Code: [Select]
ulx logecho 2
XGUI
Open XGUI > Click "Settings" tab > Click "Server" tab > Click "ULX Command/Event Echoes" > Set the first option field to "Echo commands and identify admin".



Be careful with accepting screenshots as evidence. They can be forged easily. You can double-check if the evidence they submitted matches with the log files!

Edit: Oops! feldma beat me to it. :D
« Last Edit: May 31, 2018, 02:23:47 AM by Timmy »

Offline feldma

  • Newbie
  • *
  • Posts: 47
  • Karma: 5
  • 5696 hours in Gmod and counting!
    • Mega-Strike Network
Re: (Someone) did something to whoever
« Reply #3 on: February 28, 2016, 10:01:07 PM »
Follow his instructions, much more detailed and actually correct ;)
Solving 50% of people's questions by searching it up on google.

Trying to think of a cool idea to code, so I can inspire myself to code. If you want something done, please message me!

Offline jojothemitchellinman

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: (Someone) did something to whoever
« Reply #4 on: February 29, 2016, 12:50:20 PM »
Thanks for the help!

Offline Caiin

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: (Someone) did something to whoever
« Reply #5 on: July 01, 2017, 11:51:24 PM »
I understand this is a necro, however creating a new post seems irrelevant as all the required info is here.

Regarding Timmy's comment, is it possible to make it so that a specific user or steamid's commands are shown as anonymous or console, while others are identified?

Offline Timmy

  • Ulysses Team Member
  • Sr. Member
  • *****
  • Posts: 252
  • Karma: 168
  • Code monkey
Re: (Someone) did something to whoever
« Reply #6 on: July 02, 2017, 04:53:24 AM »
Is it possible to make it so that a specific user or steamid's commands are shown as anonymous or console, while others are identified?

An easy way to achieve this is simply using rcon for commands when you don't want to be identified. But it can get annoying to prepend !rcon before every command, and access to rcon can only be given to people you fully trust.

A better solution might be to change the value of ulx logEcho depending on who runs the command with a script.

Example:
Code: [Select]
local anonymous = {
    ["STEAM_0:0:12345678"] = true,
    ["STEAM_0:0:57225082"] = true,
}

hook.Add( ULib.HOOK_COMMAND_CALLED, "cypherpunk", function( ply, cmd, args )
    if args[1] == "logecho" then return end

    if ply:IsValid() and anonymous[ ply:SteamID() ] then
        ulx.cvars.logecho.obj:SetInt( 1 )
    else
        ulx.cvars.logecho.obj:SetInt( 2 )
    end
end, HOOK_MONITOR_HIGH )

I have attached this example to my post in addon format. You can edit ulx-anonymous/lua/ulx/modules/anonymous.lua and add the SteamIDs that should be shown as anonymous to the anonymous table.
« Last Edit: July 02, 2017, 08:28:19 AM by Timmy »