diff options
Diffstat (limited to 'src/server/worldserver/Main.cpp')
-rw-r--r-- | src/server/worldserver/Main.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/server/worldserver/Main.cpp b/src/server/worldserver/Main.cpp index 33ece8197f8..61aaf5f2ee9 100644 --- a/src/server/worldserver/Main.cpp +++ b/src/server/worldserver/Main.cpp @@ -33,7 +33,7 @@ #ifndef _TRINITY_CORE_CONFIG # define _TRINITY_CORE_CONFIG "worldserver.conf" -#endif //_TRINITY_CORE_CONFIG +#endif #ifdef _WIN32 #include "ServiceWin32.h" @@ -56,7 +56,7 @@ LoginDatabaseWorkerPool LoginDatabase; ///< Accessor to the uint32 realmID; ///< Id of the realm /// Print out the usage string for this program on the console. -void usage(const char *prog) +void usage(const char* prog) { printf("Usage:\n"); printf(" %s [<options>]\n", prog); @@ -70,14 +70,14 @@ void usage(const char *prog) } /// Launch the Trinity server -extern int main(int argc, char **argv) +extern int main(int argc, char** argv) { ///- Command line parsing to get the configuration file name char const* cfg_file = _TRINITY_CORE_CONFIG; int c = 1; - while ( c < argc ) + while (c < argc) { - if (strcmp(argv[c], "-c") == 0) + if (!strcmp(argv[c], "-c")) { if (++c >= argc) { @@ -90,10 +90,7 @@ extern int main(int argc, char **argv) } #ifdef _WIN32 - //////////// - //Services// - //////////// - if (strcmp(argv[c], "-s") == 0) + if (strcmp(argv[c], "-s") == 0) // Services { if (++c >= argc) { @@ -101,6 +98,7 @@ extern int main(int argc, char **argv) usage(argv[0]); return 1; } + if (strcmp(argv[c], "install") == 0) { if (WinServiceInstall()) @@ -120,11 +118,9 @@ extern int main(int argc, char **argv) return 1; } } + if (strcmp(argv[c], "--service") == 0) - { WinServiceRun(); - } - //// #endif ++c; } |