The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
.ADMIN menu hardcoded
Author Message
x77x
Master
**

Posts: 488
Likes Given: 0
Likes Received: 15 in 15 posts
Joined: Mar 2012
Reputation: -4



Post: #1
.ADMIN menu hardcoded
i know this is hardcoded, but if i could remake this with a gump, it would solve all my problems...

[Image: adminmenu.png]

anyone on the inside care to share?

Dragons of Time 2000-2020
http://dragonsoftime.com
(This post was last modified: 10-23-2016 05:47 AM by x77x.)
05-01-2014 09:58 PM
Find all posts by this user Like Post Quote this message in a reply
Avatar
Journeyman
*

Posts: 172
Likes Given: 6
Likes Received: 27 in 12 posts
Joined: Apr 2012
Reputation: 5

The North Shield

Post: #2
RE: .ADMIN menu hardcoded
It is not hard-coded. You can go and check nightly build scripts and there is sphere_admin.scp with include [DIALOG d_sphereadmin]. You can change whatever content inside on it with no problem. Let me ask you which version of sphere server are you using ? I'm talking about last releases including 2008 to 2014.

Here you can look at : http://spherescripts.sytes.net/filedetai..._admin.scp
(This post was last modified: 05-02-2014 12:54 AM by Avatar.)
05-02-2014 12:51 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #3
RE: .ADMIN menu hardcoded
it's the sphere 51 sectionBig Grin
05-02-2014 12:54 AM
Find all posts by this user Like Post Quote this message in a reply
Avatar
Journeyman
*

Posts: 172
Likes Given: 6
Likes Received: 27 in 12 posts
Joined: Apr 2012
Reputation: 5

The North Shield

Post: #4
RE: .ADMIN menu hardcoded
Haha lol, Really now I see it. These days, I lost my self because of projects etc. Big Grin I donot really have any idea about 51a realy. Why dont you upgrade your existed sphere to last one. you can try, it is easy.
(This post was last modified: 05-02-2014 06:11 AM by Avatar.)
05-02-2014 06:10 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
x77x
Master
**

Posts: 488
Likes Given: 0
Likes Received: 15 in 15 posts
Joined: Mar 2012
Reputation: -4



Post: #5
RE: .ADMIN menu hardcoded
even hardcoded, theres gotta be a way to recreate it in gump

51a never had a way to see whos online and/or message them
(for players)

Dragons of Time 2000-2020
http://dragonsoftime.com
(This post was last modified: 05-02-2014 09:17 PM by x77x.)
05-02-2014 09:16 PM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #6
RE: .ADMIN menu hardcoded
I don't know, can you use <serv.clients> / <serv.client.n.uid> ? if so you can do it ... if not I think it's not scriptable.
05-02-2014 10:08 PM
Find all posts by this user Like Post Quote this message in a reply
x77x
Master
**

Posts: 488
Likes Given: 0
Likes Received: 15 in 15 posts
Joined: Mar 2012
Reputation: -4



Post: #7
RE: .ADMIN menu hardcoded
just a name would be nice...

kinda like .clients

but without the account name, ip, and location

Dragons of Time 2000-2020
http://dragonsoftime.com
05-03-2014 12:22 AM
Find all posts by this user Like Post Quote this message in a reply
x77x
Master
**

Posts: 488
Likes Given: 0
Likes Received: 15 in 15 posts
Joined: Mar 2012
Reputation: -4



Post: #8
RE: .ADMIN menu hardcoded
hmm

Code:
void CClient::addGumpDialogAdmin( int iAdPage, int iSortType )
    {
        // Alter this routine at your own risk....if anymore
        // bytes get sent to the client, you WILL crash them
        // Take away, but don't add (heh) (actually there's like
        // 100 bytes available, but they get eaten up fast with
        // this gump stuff)
    
        static LPCTSTR const sm_szGumps = // These are on every page and don't change
        {
                "page 0",
                "resizepic 0 0 5120 623 310",
                "resizepic 242 262 5120 170 35",
                "text 230 10 955 0",
        };
    
        CGString sControls;
        int iControls = 0;
    
        while ( iControls<COUNTOF(sm_szGumps))
        {
                sControls = sm_szGumps;
                iControls++;
        }
    
        CGString sText;
        int iTexts=1;
        sText.Format( "Admin Control Panel (%d clients)", g_Serv.m_Clients.GetCount());
    
        static const int sm_iColSpaces = // These are on every page and don't change
        {
                8 + 19,         // Text (sock)
                8 + 73,         // Text (account name)
                8 + 188,        // Text (name)
                8 + 328,        // Text (ip)
                8 + 474         // Text (location)
        };
    
        static LPCTSTR const sm_szColText = // These are on every page and don't change
        {
                "Sock",
                "Account",
                "Name",
                "IP Address",
                "Location"
        };
    
        while ( iTexts<=COUNTOF(sm_szColText) )
        {
                sControls.Format( "text %d 30 955 %d", sm_iColSpaces-2, iTexts );
                iControls++;
    
                sText = sm_szColText;
                iTexts++;
        }
    
        // Count clients to show.
        // Create sorted list.
        CClientSortList ClientList;
        ClientList.SortByType( 1, m_pChar );
    
        // none left to display for this page ?
        int iClient = iAdPage*ADMIN_CLIENTS_PER_PAGE;
        if ( iClient >= ClientList.GetCount())
        {
                iAdPage = 0;    // just go back to first page.
                iClient = 0;
        }
    
        m_tmGumpAdmin.m_iPageNum = iAdPage;
        m_tmGumpAdmin.m_iSortType = iSortType;
    
        int iY = 50;
    
        for ( int i=0; iClient<ClientList.GetCount() && i<ADMIN_CLIENTS_PER_PAGE; iClient++, i++ )
        {
                CClient * pClient = ClientList.GetAt(iClient);
                ASSERT(pClient);
    
                // Sock buttons
                //      X, Y, Down gump, Up gump, pressable, iPage, id
                sControls.Format(
                        "button 12 %i 2362 2361 1 1 %i",
                        iY + 4, // Y
                        901 + i );      // id
    
                for ( int j=0; j<COUNTOF(sm_iColSpaces); j++ )
                {
                        sControls.Format(
                                "text %i %i 955 %i",
                                sm_iColSpaces,
                                iY,
                                iTexts+j );
                }
    
                CSocketAddress PeerName = pClient->m_Socket.GetPeerName();
    
                TCHAR accountName;
                strcpylen( accountName, pClient->GetName(), 12 );
                // max name size for this dialog....otherwise CRASH!!!, not a big enuf buffer :(
    
                CChar * pChar = pClient->GetChar();
                if ( pClient->IsPriv(PRIV_GM) || pClient->GetPrivLevel() >= PLEVEL_Counsel )
                {
                        memmove( accountName+1, accountName, 13 );
                        accountName = ( pChar && pChar->IsDND()) ? '*' : '+';
                }
    
                ASSERT( i<COUNTOF(m_tmGumpAdmin.m_Item));
                if ( pChar != NULL )
                {
                        m_tmGumpAdmin.m_Item = pChar->GetUID();
    
                        TCHAR characterName;
                        strcpy(characterName, pChar->GetName());
                        characterName = 0; // same comment as the accountName...careful with this stuff!
                        sText.Format("%x", pClient->m_Socket.GetSocket());
                        sText = accountName;
                        sText = characterName;
    
                        CPointMap pt = pChar->GetTopPoint();
                        sText.Format( "%s", PeerName.GetAddrStr()) ;
                        sText.Format( "%d,%d,%d ",
                                pt.m_x,
                                pt.m_y,
                                pt.m_z,
                                pt.m_mapplane) ;
                }
                else
                {
                        m_tmGumpAdmin.m_Item = 0;
    
                        sText.Format( "%03x", pClient->m_Socket.GetSocket());
                        sText = accountName;
                        sText = "N/A";
                        sText = PeerName.GetAddrStr();
                        sText = "N/A";
                }
    
                iY += 20; // go down a 'line' on the dialog
        }
    
        if ( m_tmGumpAdmin.m_iPageNum ) // is there a previous ?
        {
                sControls = "button 253 267 5537 5539 1 0 801"; // p
        }
        if ( iClient<ClientList.GetCount())     // is there a next ?
        {
                sControls = "button 385 267 5540 5542 1 0 802"; // n
        }
    
        addGumpDialog( CLIMODE_DIALOG_ADMIN, sControls, iControls, sText, iTexts, 0x05, 0x46 );
    }

Dragons of Time 2000-2020
http://dragonsoftime.com
(This post was last modified: 05-03-2014 10:47 AM by x77x.)
05-03-2014 10:38 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #9
RE: .ADMIN menu hardcoded
So?
05-03-2014 04:55 PM
Find all posts by this user Like Post Quote this message in a reply
x77x
Master
**

Posts: 488
Likes Given: 0
Likes Received: 15 in 15 posts
Joined: Mar 2012
Reputation: -4



Post: #10
RE: .ADMIN menu hardcoded
look at it, is there anyway to do it in a gump?

Dragons of Time 2000-2020
http://dragonsoftime.com
05-04-2014 12:16 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 4 Guest(s)