Thread: ServerInterface

Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    -Bl00d-'s Avatar
    Join Date
    Sep 2011
    Gender
    female
    Location
    Imma girl what about it?
    Posts
    481
    Reputation
    10
    Thanks
    53
    My Mood
    Twisted

    ServerInterface

    well since unlimited ammo was released...
    might as well leak this around. please don't spam
    ServerInt.h:
    Code:
    #ifndef __SERVER_INT_H__
    Code:
    #define __SERVER_INT_H__
    #ifndef __LTBASEDEFS_H__
    #include "ltbasedefs.h"
    #endif
    #include "iltmessage.h"
    
    
    
    
    class ILTMessage_Read;
    class ILTMessage_Write;
    #define SI_VERSION    2
    
    
    enum
    {
        
        UPDATEFLAG_NONACTIVE =        1,
    };
    
    
    
    
    
    
    
    
    typedef uint32 SI_CREATESTATUS;
    
    
    
    
    enum
    {
        SI_OK =                0,            
        SI_ALREADYINSTANCED =    1,        
        SI_INVALIDVERSION =    2,            
        SI_ERRORINITTING =    3,            
        SI_CANTLOADRESOURCEMODULE =    4,    
    };
    
    
    
    
    
    
    
    
    
    
    #define    MAX_CLIENTINFO_NAME    64
    struct ClientInfo
    {
        char    m_sName[MAX_CLIENTINFO_NAME];
        uint32    m_ClientID;
        float    m_Ping;
    };
    
    
    
    
    
    
    
    
    class ServerAppHandler
    {
    public:
        virtual LTRESULT ShellMessageFn( ILTMessage_Read& /*msg*/ ) {return LT_OK;}
        virtual LTRESULT ConsoleOutputFn(const char * /*pMsg*/) {return LT_OK;}
        virtual LTFLOAT GetCPUUtilization() { return 0.0f; }
        virtual LTRESULT OutOfMemory() {return LT_OK;}
        virtual LTRESULT ProcessPacket(ILTMessage_Read & /*cMsg*/, uint8 senderAddr[4], uint16 /*senderPort*/) {return LT_OK;}
    };
    
    
    
    
    class ServerInt
    {
    public:
    
    
        
        virtual LTRESULT SetAppHandler(ServerAppHandler *pHandler)=0;
        virtual bool Init(int argc, char** argv)=0;
        virtual LTRESULT LoadConfigFile(char *pFilename)=0;
        virtual LTRESULT SaveConfigFile(char *pFilename)=0;
        virtual LTRESULT SendToServerShell( ILTMessage_Read& msg )=0;
        virtual bool    AddResources(const char **pResources, uint32 nResources)=0;
        virtual bool    SetGameInfo( void *pGameInfo, uint32 nGameInfoLen ) = 0;
        virtual bool    LoadBinaries( ) = 0;
    
    
    
    
        virtual FileEntry*    GetFileList(char *pDirName)=0;
        virtual void    FreeFileList(FileEntry *pList)=0;
        virtual bool    StartWorld(StartGameRequest *pRequest)=0;
        virtual int        GetNumClients()=0;
        virtual bool    GetClientName(int index, char *pName, int maxChars)=0;
        virtual bool    SetClientName(int index, char *pName, int maxChars)=0;
        virtual bool    GetClientInfo(int index, ClientInfo* pInfo)=0;
        virtual    bool    BootClient(uint32 dwClientID)=0;
        virtual bool    GetClientPing( uint32 nClientId, float &ping )=0;
        virtual bool    GetClientAddr( uint32 nClientId, uint8 pAddr[4], uint16 *pPort) = 0;
        virtual void    GetErrorString(wchar_t* pwszString, int maxLen)=0;
        virtual bool    Update(long flags)=0;
        virtual bool    InitNetworking(char *pDriver, uint32 dwFlags)=0;
        virtual bool    GetServiceList(NetService *&pListHead)=0;
        virtual bool    FreeServiceList(NetService *pListHead)=0;
        virtual bool    SelectService(HNETSERVICE hNetService)=0;
        virtual bool    UpdateSessionName(const char* sName)=0;
        virtual bool    HostGame(NetHost* pHostInfo)=0;
        virtual bool    GetTcpIpAddress(char* sAddress, uint32 dwBufferSize, unsigned short &hostPort)=0;
        virtual LTRESULT    SendTo(ILTMessage_Read *pMsg, const char *sAddr, uint32 port)=0;
    
    
    };
    
    
    
    }
    IDK whats been going on but code tags are spazzing lately its all in the same file not split like this
    Credits to:
    Tim0n
    mattypatty
    necrosyz
    s0beit
    myself
    FEAR and NOLF2 SDK
    RuKKa
    &
    RuKKa's BiTCh (yes that's his actual username)
    Last edited by -Bl00d-; 01-09-2013 at 10:04 PM.
    Successful buys: 20
    Successful sells: 4
    Successful trades: 9
    Scammed: 4

     
    http://www.mpgh.net/forum/490-vouches/560562-vouches.html

    ^^^^^^^^^^^
    vouche for me?

  2. The Following 4 Users Say Thank You to -Bl00d- For This Useful Post:

    Acea (01-09-2013),pDevice (01-09-2013),The Decoder (01-14-2013),ZysorceN (01-10-2013)

  3. #2
    Flengo's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    Ontario, Canada
    Posts
    15,714
    Reputation
    3319
    Thanks
    11,143
    My Mood
    Happy
    What is this. This looks absolutely useless.

    You should explain what it is, since by looking at it there's not much there.
    I Read All Of My PM's & VM's
    If you need help with anything, just let me know.
     
     
    VM | PM

    Publicist Since 04.04.2015
    Middleman Since Unknown - Unknown
    Global Moderator Since 08.01.2013
    Donator Since 05.29.2013

    Minion+ Since 04.18.2013

    District 187 Minion Since 04.04.2013
    Steam Minion Since 02.26.2013
    WarRock Minion Since 02.19.2013
    A.V.A Minion Since 02.13.2013
    DayZ Minion Since 01.21.2013
    Combat Arms Minion Since 12.26.2012
    Contributor Since 11.16.2012
    Member Since 05.11.2010


  4. #3
    supercarz1991's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    North of Hell, South of Heaven
    Posts
    6,067
    Reputation
    323
    Thanks
    3,323
    My Mood
    Doh
    i was a bit confused by it too. i've never even seen this before and i've been through every header file and cpp file in CShell for NOLF2

    commando: You're probably the best non-coder coder I know LOL


  5. #4
    -Bl00d-'s Avatar
    Join Date
    Sep 2011
    Gender
    female
    Location
    Imma girl what about it?
    Posts
    481
    Reputation
    10
    Thanks
    53
    My Mood
    Twisted
    its basically all server shit
    and more detail on how they work
    theres more to it, there still not much
    if any documentation on it.
    if it wasnt for RuKKa and mattypatty
    i would have never known at all

    but basically just a bunch of shit for how the server reads
    and writes and sends
    i still have mattypatty's original with all the million comments and
    a few things i took out that are still in it
    Successful buys: 20
    Successful sells: 4
    Successful trades: 9
    Scammed: 4

     
    http://www.mpgh.net/forum/490-vouches/560562-vouches.html

    ^^^^^^^^^^^
    vouche for me?

  6. #5
    Acea's Avatar
    Join Date
    Oct 2012
    Gender
    female
    Location
    Home of the elks
    Posts
    346
    Reputation
    80
    Thanks
    2,204
    My Mood
    Stressed
    ..............
    Credit necrosyz to, what ever matty did and does was because of necro...

  7. #6
    -Bl00d-'s Avatar
    Join Date
    Sep 2011
    Gender
    female
    Location
    Imma girl what about it?
    Posts
    481
    Reputation
    10
    Thanks
    53
    My Mood
    Twisted
    Quote Originally Posted by Acea View Post
    ..............
    Credit necrosyz to, what ever matty did and does was because of necro...
    ok,, i only put credits of who i knew im not as familiar with necro as the others my bad
    Successful buys: 20
    Successful sells: 4
    Successful trades: 9
    Scammed: 4

     
    http://www.mpgh.net/forum/490-vouches/560562-vouches.html

    ^^^^^^^^^^^
    vouche for me?

  8. The Following User Says Thank You to -Bl00d- For This Useful Post:

    Acea (01-09-2013)

  9. #7
    Flengo's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    Ontario, Canada
    Posts
    15,714
    Reputation
    3319
    Thanks
    11,143
    My Mood
    Happy
    Quote Originally Posted by -Bl00d- View Post

    ok,, i only put credits of who i knew im not as familiar with necro as the others my bad
    Necrosyz = Legendy on this forum.

    So you can mention him, but include his most known name.
    I Read All Of My PM's & VM's
    If you need help with anything, just let me know.
     
     
    VM | PM

    Publicist Since 04.04.2015
    Middleman Since Unknown - Unknown
    Global Moderator Since 08.01.2013
    Donator Since 05.29.2013

    Minion+ Since 04.18.2013

    District 187 Minion Since 04.04.2013
    Steam Minion Since 02.26.2013
    WarRock Minion Since 02.19.2013
    A.V.A Minion Since 02.13.2013
    DayZ Minion Since 01.21.2013
    Combat Arms Minion Since 12.26.2012
    Contributor Since 11.16.2012
    Member Since 05.11.2010


  10. The Following User Says Thank You to Flengo For This Useful Post:

    Acea (01-09-2013)

  11. #8
    -Bl00d-'s Avatar
    Join Date
    Sep 2011
    Gender
    female
    Location
    Imma girl what about it?
    Posts
    481
    Reputation
    10
    Thanks
    53
    My Mood
    Twisted
    i didnt know that ?! oh snap my bad
    Successful buys: 20
    Successful sells: 4
    Successful trades: 9
    Scammed: 4

     
    http://www.mpgh.net/forum/490-vouches/560562-vouches.html

    ^^^^^^^^^^^
    vouche for me?

  12. #9
    Xlilzoosk8rX's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    the-ville, PA
    Posts
    358
    Reputation
    24
    Thanks
    53
    so this is for the different functions of the
    server and examples of how to use them?

  13. #10
    kssiobr's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    Nos braços do Pai Celestial...
    Posts
    726
    Reputation
    10
    Thanks
    330
    My Mood
    Cheeky
    Very interesting, but how to use? To which servanthood?

  14. The Following User Says Thank You to kssiobr For This Useful Post:

    The Decoder (01-14-2013)

  15. #11
    supercarz1991's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    North of Hell, South of Heaven
    Posts
    6,067
    Reputation
    323
    Thanks
    3,323
    My Mood
    Doh
    i mean if you can emulate or capture the server's response, you can do anything. i'm guessing that's what this is for?

    commando: You're probably the best non-coder coder I know LOL


  16. #12
    iamspeedforyou's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    Look up.
    Posts
    89
    Reputation
    10
    Thanks
    42
    interesting.. i see this is finally getting out, i have the commented version.. along with menu bases

  17. #13
    supercarz1991's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    North of Hell, South of Heaven
    Posts
    6,067
    Reputation
    323
    Thanks
    3,323
    My Mood
    Doh
    Quote Originally Posted by iamspeedforyou View Post
    interesting.. i see this is finally getting out, i have the commented version.. along with menu bases
    i have a commented one but its the original source... same thing?

    commando: You're probably the best non-coder coder I know LOL


  18. The Following User Says Thank You to supercarz1991 For This Useful Post:

    -Bl00d- (01-15-2013)

  19. #14
    -Bl00d-'s Avatar
    Join Date
    Sep 2011
    Gender
    female
    Location
    Imma girl what about it?
    Posts
    481
    Reputation
    10
    Thanks
    53
    My Mood
    Twisted
    Quote Originally Posted by supercarz1991 View Post
    i have a commented one but its the original source... same thing?
    Code:
       virtual LTRESULT    SendTo(ILTMessage_Read *pMsg, const char *sAddr, uint32 port)=0;
    see if thats the last line on your source.if thats the last line then you have this version thats commented,thers another version that has more crap in it but it wont work for CA
    Successful buys: 20
    Successful sells: 4
    Successful trades: 9
    Scammed: 4

     
    http://www.mpgh.net/forum/490-vouches/560562-vouches.html

    ^^^^^^^^^^^
    vouche for me?

  20. #15
    supercarz1991's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    North of Hell, South of Heaven
    Posts
    6,067
    Reputation
    323
    Thanks
    3,323
    My Mood
    Doh
    Quote Originally Posted by -Bl00d- View Post

    Code:
       virtual LTRESULT    SendTo(ILTMessage_Read *pMsg, const char *sAddr, uint32 port)=0;
    see if thats the last line on your source.if thats the last line then you have this version thats commented,thers another version that has more crap in it but it wont work for CA
    nope its different. oh well no biggy

    commando: You're probably the best non-coder coder I know LOL


Page 1 of 2 12 LastLast