1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Admin Gump - Owner Account.

Discussion in 'Script Support' started by Ce Jayce, Feb 20, 2014.

  1. Ce Jayce
    Offline

    Ce Jayce Member

    Joined:
    Jan 24, 2014
    Messages:
    140
    Likes Received:
    14
    Publish Number:
    54
    So I've been trying to make a modified version of the AdminGump - got several versions floating about but at the moment I've rolled back to the base one to try and get this issue solved!
    Currently I'm trying to make it so that the Owner account (Or any above your access level is hidden) from the Admin gump.
    So I don't want Admins to be able to view my account name, characters, linked accounts, IP's and most importantly if i'm logged in or not!
    I hate it when my Admins open up [Admin go to my account then teleport to me using to go to feature. I wan't to be able to log in and get a few things sorted on the sly every now and again without them asking me 100 and 1 questions the second I log in and I would like to be able to set up some players and just PLAY on my server without fear of my admins sending me pms on my player asking me this/that any bias in duels etc. etc.

    The list of reasons goes on but, i'm truly stuck on this one so if anyone could help me out it would be greatly appreciated!

    Thanks!
     
  2. Ravenwolfe
    Offline

    Moderator ServUO Developer

    Joined:
    Sep 7, 2013
    Messages:
    1,147
    Likes Received:
    123
    The problem is going to be one of rights. For example, its hard to have an Admin not able to see your player level account or your ip. Hiding your owner account from them will be easy.

    I'm thinking the easiest solution would be to place a tag on the accounts that you want hidden and then add a check for the tags into the admin gump script. Two dangers I can think of, make sure that you code the tag check to only effect people below owner or you could hide accounts from yourself. Secondly, you want to be sure that no one else knows the name of the tag and could remove it or place it on one of their accounts.
     
  3. Ce Jayce
    Offline

    Ce Jayce Member

    Joined:
    Jan 24, 2014
    Messages:
    140
    Likes Received:
    14
    Thanks for the quick response!
    I don't mind admins seeing my player account just so long as they can't link it with my owner account in anyway what so ever, so if they go IP -> Shared accounts etc.
    I guess I could do it with an account tag but I don't think that route is necessary for just hiding the owner account?

    **EDIT**
    Scratch that, I think i've found the appropriate sections to do the edits in now. I'll post back here if it's a success or epic failure :p
     
    #3 Ce Jayce, Feb 20, 2014
    Last edited: Feb 20, 2014
  4. Ce Jayce
    Offline

    Ce Jayce Member

    Joined:
    Jan 24, 2014
    Messages:
    140
    Likes Received:
    14
    Ok got it finally, - Props to _Epila_ on RunUO for drawing my attention to the right areas!
    For anyone else wanting to do the same look for
    case AdminGumpPage.Clients:
    case AdminGumpPage.Accounts_Shared:
    case AdminGumpPage.Accounts:
    Then in those sections at the top look for
    Code (C#):
    1.                    
    2.                             if (this.m_List == null)
    3.                             {
    4.                                 this.m_List = new ArrayList(NetState.Instances);
    5.                                 this.m_List.Sort(NetStateComparer.Instance);
    6.                             }
    Then edit that to be;
    Code (C#):
    1. if (this.m_List == null)
    2. {
    3.     this.m_List = new ArrayList();
    4.     foreach(NetState ns in NetState.Instances)
    5.     {
    6.         if (ns.Account.AccessLevel <= from.AccessLevel)
    7.             m_List.Add(ns); //foreach does not allow you to modify the list during the loop, so we check every entry before adding it
    8.                             //if you want more examples on how to remove invalid entries, check here: http://stackoverflow.com/questions/8791557/efficiently-deleting-item-from-within-foreach
    9.     }
    10.     this.m_List.Sort(NetStateComparer.Instance);
    11. }
    There are a few other areas you need to edit to make it completely proof, such as the bit where you can search for an IP and the bit where you can list all accounts but just hitting search.

    I've attached my AdminGump.cs with all the necessary edits to achieve this for anyone wanting to do the same.
     

    Attached Files:

    • Two Thumbs Up Two Thumbs Up x 2
  5. Ce Jayce
    Offline

    Ce Jayce Member

    Joined:
    Jan 24, 2014
    Messages:
    140
    Likes Received:
    14
    Sorry to drag up a slightly old thread now but i'm a little baffled again. I pushed this to my live server and it just didn't work full stop. However using a fresh server with a new set of saves it does fine?

    I've checked again and again to make sure that I have actually put the file into my server so it's not that. Any thoughts on what it could be? I've tried to test it with previous 'admin' level accounts and a new one that I created but I was still able to pull up the details of accounts with levels above me.

    Any ideas?

    Cheers
     
  6. Ce Jayce
    Offline

    Ce Jayce Member

    Joined:
    Jan 24, 2014
    Messages:
    140
    Likes Received:
    14
    So after trying to figure this one out for a good hour, I find the answer right after posting up here!
    If anyone else should run into the same issue. My account didn't have 'Owner' Access level in Accounts.xml just my character so obviously it was still showing up the account info as it was a 'player' account.
     
Similar Threads: Admin Gump
Forum Title Date
Archived Bug Reports Admin Gump - Maintenance Feb 23, 2017
ServUO Discussion Admin command list Jul 8, 2017
Archived Bug Reports admin [kill offline player crash bug Jul 2, 2017
General Discussion Changing Admin public Chat color? Mar 7, 2017
General Discussion Question: How do I Reset Admin Password? Apr 20, 2016
Think Tank Shard Admins - More control over being able to see the amount of gold in the world. Apr 2, 2016
3rd Party Applications Ntony's Remote Admin Enrichment Jan 12, 2016