aboutsummaryrefslogtreecommitdiff
path: root/src/server/worldserver/Main.cpp
diff options
context:
space:
mode:
authorNay <dnpd.dd@gmail.com>2013-07-28 16:59:07 +0100
committerNay <dnpd.dd@gmail.com>2013-07-28 16:59:07 +0100
commitf71d894a215ed7cd9052913c9b07c8f62f0e99ca (patch)
treed1253ba869f0195c23d05630cbd7315dd07e1421 /src/server/worldserver/Main.cpp
parent62918e92d0493978e16f5fb1365818e9efa8461b (diff)
Servers: Fix some code style issues in world and authserver
Diffstat (limited to 'src/server/worldserver/Main.cpp')
-rw-r--r--src/server/worldserver/Main.cpp20
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;
}