All pastes #635212 Raw Edit

Someone

public text v1 · immutable
#635212 ·published 2007-07-26 22:26 UTC
rendered paste body
#include "SystemConfig.h"
#include "Common.h"

int main(int argc, char **argv)
{
    ///- Command line parsing to get the configuration file name
    char const* cfg_file = _OPCODE_CONFIG;
    int c=1;
    while( c < argc )
    {
        if( strcmp(argv[c],"-c") == 0)
        {
            if( ++c >= argc )
            {
                sLog.outError("Runtime-Error: -c option requires an input argument");
                usage(argv[0]);
                return 1;
            }
            else
                cfg_file = argv[c];
        }
        else
        {
            sLog.outError("Runtime-Error: unsupported option %s",argv[c]);
            usage(argv[0]);
            return 1;
        }
        ++c;
    }

    if (!sConfig.SetSource(cfg_file))
    {
        sLog.outError("Could not find configuration file %s.", cfg_file);
        return 1;
    }
	sLog.outString("Using Opcodes" EXPECTED_MANGOS_CLIENT_BUILD ".conf");
}