Author Topic: (ADMIN) Displayed When User Votekicks  (Read 2541 times)

0 Members and 1 Guest are viewing this topic.

Offline Mr.Bean

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
(ADMIN) Displayed When User Votekicks
« on: August 27, 2009, 05:17:24 PM »
Hello, I have my groups setup so normal users can use !votekick.
When they do this command it comes up in chat saying something like "(ADMIN) Player started votekick".
I would like to know if it's possible to remove the "(ADMIN)" out of this message so that players don't think that this user has suddenly become an admin.

Thanks for any help.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: (ADMIN) Displayed When User Votekicks
« Reply #1 on: August 27, 2009, 06:41:06 PM »
Not possible to remove that message easily.
Experiencing God's grace one day at a time.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: (ADMIN) Displayed When User Votekicks
« Reply #2 on: August 27, 2009, 07:25:14 PM »
Find a good text editor that counts/shows line numbers.
Open file \addons\ulx\lua\ulx\modules\vote.lua
Find line 288 (as of current SVN). Should look like
Code: [Select]
ulx.logUserAct( ply, target, "#A started a votekick against #T." )

Change it to
Code: [Select]
ulx.logUserAct( ply, target, ply:Nick() .. " started a votekick against #T." )

Now, that's quick, dirty, will never show if the person starting the vote was an admin or not, won't show if you used/have silent log mode enabled, unknown to me what happens if console starts a vote, and may get overwritten during future updates.
« Last Edit: August 27, 2009, 07:30:55 PM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: (ADMIN) Displayed When User Votekicks
« Reply #3 on: August 27, 2009, 07:34:19 PM »
Megiddo, now that I review our log gsub's, the next version might be a good idea to start using the new GetGroup (or whatever the new ULib-get-top-group command will be) to replace [Admin] with [<Groupname>]

That would help for custom group commands in the future.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: (ADMIN) Displayed When User Votekicks
« Reply #4 on: August 27, 2009, 08:46:02 PM »
Added to the todo list!
Experiencing God's grace one day at a time.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: (ADMIN) Displayed When User Votekicks
« Reply #5 on: September 07, 2009, 09:49:01 PM »
All, I've just committed revision 61 to the SVN repo. It should now show what group people are in for logged actions.
This will allow for commands in any group, not just an 'admin' one.

Due to the late hour, I only tested on a ded server with superadmin access.
Let me know if you see any issues.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming