2017-08-08 13:53:47 +02:00
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
#include "ServerZone.h"
|
2017-08-11 23:13:00 +01:00
|
|
|
#include <boost/algorithm/string.hpp>
|
2017-08-08 13:53:47 +02:00
|
|
|
|
|
|
|
Core::ServerZone g_serverZone( "config/settings_zone.xml" );
|
|
|
|
|
2017-08-11 22:56:30 +01:00
|
|
|
int main( int32_t argc, char* argv[] )
|
2017-08-08 13:53:47 +02:00
|
|
|
{
|
|
|
|
// i hate to do this, but we need to set this first...
|
|
|
|
for(auto i = 1; i < argc; ++i )
|
|
|
|
{
|
2017-08-11 23:13:00 +01:00
|
|
|
auto arg = boost::to_lower_copy( std::string( argv[i] ) );
|
2017-08-08 13:53:47 +02:00
|
|
|
|
|
|
|
// trim '-' from start of arg
|
|
|
|
arg = arg.erase( 0, arg.find_first_not_of( '-' ) );
|
|
|
|
if( arg == "sId" && argc > i + 1 )
|
|
|
|
{
|
|
|
|
g_serverZone.setServerId( std::atol( argv[i + 1] ) );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
g_serverZone.run( argc, argv );
|
|
|
|
return 0;
|
|
|
|
}
|