EOSERV Forum > EOSERV > Let admins see other hidden admin names on the online list
Page: << 1 >>
Let admins see other hidden admin names on the online list
Author Message
Post #197276 Let admins see other hidden admin names on the online list

The title basically says it all, but this release basically lets admins see other hidden admins on the online list. Admins will have a ~ by their name if they're hidden, I think Sordie did this in Seose (thanks for the idea :D). I was going to add an option to set it so only certain ranks can see other hidden admins online, but there's really no point. Why do admins need to hide from admins?

To add this edit the appropriate lines in Player_List in Players.cpp

Paste: http://pastebin.com/yKazyh3i

Trunk: http://www.mediafire.com/download/4e5ywd9s1zqz0c9/trunk.zip

The trunk contains basic pets: https://eoserv.net/forum/topic/23289#post197274

Please post if I missed anything, or if you get errors and I will try reply as fast as I can.

I will also be taking any sensible requests and will continue to add onto this trunk.

8 years, 38 weeks ago
Post #197277 Re: Let admins see other hidden admin names on the online list

I am not sure why you didn't just add to the boolean this: if (character->hidden && !client->player->character->admin) or something of that nature rather than doubling the entire code. Would be optimal also to either set a config value to minimum rank required or toggle see hidden mode via command.

8 years, 38 weeks ago
Post #197278 Re: Let admins see other hidden admin names on the online list
Apollo posted: (8th Aug 2015, 08:49 pm)

I am not sure why you didn't just add to the boolean this: if (character->hidden && !client->player->character->admin) or something of that nature rather than doubling the entire code. Would be optimal also to either set a config value to minimum rank required or toggle see hidden mode via command.


Add it and see what happens.. xd The original code was alot shorter but caused problems with the sln so I just did this since it's super easy and doesn't make it too long.
8 years, 38 weeks ago
Post #197279 Re: Let admins see other hidden admin names on the online list

Edit: I did it for you. Can't be arsed assuming someone might use your code. Altered 2 lines, added 2 lines. See comment lines "//" for the explanation of why things were changed.

 bool admin = false;                                    //added a Boolean set to false
    if (client->player && client->player->character) admin = client->player->character->admin;       //told the SLN to fuck off it it isn't a game client with a logged in player 
 UTIL_FOREACH(client->server()->world->characters, character)
 {
  if (character->hidden && !admin) //added && !admin here
  {
   --online;
  }
 }

 PacketBuilder reply(PACKET_F_INIT, PACKET_A_INIT, 4 + client->server()->world->characters.size() * 35);
 reply.AddChar((reader.Action() == PACKET_LIST) ? INIT_FRIEND_LIST_PLAYERS : INIT_PLAYERS);
 reply.AddShort(online);
 reply.AddByte(255);
 UTIL_FOREACH(client->server()->world->characters, character)
 {
  if (character->hidden && !admin)       //added && !admin here
  {
   continue;
  }

8 years, 38 weeks ago
Post #197282 Re: Let admins see other hidden admin names on the online list

Edited and added the fix you said. You don't have to assume anything btw, if people use it or not, it's here if they decide to have a look and try out ideas similar.

8 years, 38 weeks ago
Post #197286 Re: Let admins see other hidden admin names on the online list

Just showing you how to problem solve a bit better. Mine isn't a perfect fix, could have done it in less lines. The important thing is you notice the beginning IF branch where SLN checks were accounted for and plugged them in later in a way that is useful to you.

8 years, 38 weeks ago
Post #197326 Re: Let admins see other hidden admin names on the online list

Ah, but consider this - The intuitive nature of this feature is great -> Hey, it's a squiggly, the admin is hidden.

But what about when you right click the player's name to PM them? Your client thinks their name is actually name~, so most sillies will go and actually PM that name, which will then get rejected by the server.

When I added this (exact) feature to BU, I made it so when PMing, if there is a ~ at the end of the name then it will be disregarded and only the name prior will be processed.

Good feature, though it could be cut down like Apollo suggested, and made more intuitive as suggested here.^

---
Want to learn to pixel?
Pixelsource.org
8 years, 38 weeks ago
Post #197329 Re: Let admins see other hidden admin names on the online list

You should have used the method I suggested initially, it is actually more proper in terms of how it functions. You can also tweak it to expand to an admin config or command to activate with some simple modifications.

8 years, 38 weeks ago
Post #197330 Re: Let admins see other hidden admin names on the online list

When I used it it was literally only a quick fix so admins could see each other when hidden. Admins hardly ever PM'd each other as it was normally + chats.

As for the config options and such, I didn't intend to use them as I don't see a reason why admins should stay hidden from other admins, All in all it just causes power abusive admins.

Cirras: I do remember seeing something like this in the BU trunk I have from 2013, I assumed it was Nates code as I didn't think you were coding back then.

8 years, 38 weeks ago
Post #197343 Re: Let admins see other hidden admin names on the online list

I suspect that what you saw was a dirty hack from the days where the #seehide privilege wasn't a thing - The ~ on the playerlist was an intentional emulation of SEOSE on my part in early 2015.

---
Want to learn to pixel?
Pixelsource.org
8 years, 38 weeks ago
Post #200475 Re: Let admins see other hidden admin names on the online list
Apollo posted: (8th Aug 2015, 11:22 pm)

Edit: I did it for you. Can't be arsed assuming someone might use your code. Altered 2 lines, added 2 lines. See comment lines "//" for the explanation of why things were changed.

 bool admin = false;                                    //added a Boolean set to false
    if (client->player && client->player->character) admin = client->player->character->admin;       //told the SLN to fuck off it it isn't a game client with a logged in player 
 UTIL_FOREACH(client->server()->world->characters, character)
 {
  if (character->hidden && !admin) //added && !admin here
  {
   --online;
  }
 }

 PacketBuilder reply(PACKET_F_INIT, PACKET_A_INIT, 4 + client->server()->world->characters.size() * 35);
 reply.AddChar((reader.Action() == PACKET_LIST) ? INIT_FRIEND_LIST_PLAYERS : INIT_PLAYERS);
 reply.AddShort(online);
 reply.AddByte(255);
 UTIL_FOREACH(client->server()->world->characters, character)
 {
  if (character->hidden && !admin)       //added && !admin here
  {
   continue;
  }


I'd use this fix but it contains profanity.
---
I not hacker

“Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its
whole life believing that it is stupid.” - Albert Einstein : Really Great Quote Ramy!
7 years, 43 weeks ago
Page: << 1 >>

EOSERV Forum > EOSERV > Let admins see other hidden admin names on the online list