diff options
author | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-07-29 17:11:25 +0200 |
---|---|---|
committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-07-29 17:11:25 +0200 |
commit | cb8f159cea6d6895c1412fa74d209a3dc2298c4b (patch) | |
tree | 56944635f2e06854637f5c689028dcbfd2ede8b5 /src/server/worldserver/Main.cpp | |
parent | a08b52aa197a31b9821f3f9ef425da6365065907 (diff) | |
parent | 1bb3c4a2b4e3e974f09c0df478245f8daa3a677c (diff) |
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts:
src/server/scripts/Spells/spell_dk.cpp
src/server/scripts/Spells/spell_priest.cpp
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; } |