summaryrefslogtreecommitdiff
path: root/src/char/char.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-07-03 19:47:38 +0200
committerGitHub <noreply@github.com>2016-07-03 19:47:38 +0200
commitd2f666fc10eac20f70729176c088b2c81d233531 (patch)
tree55902d4e252f365f511137d4022670ccfad59a62 /src/char/char.c
parent6fbc00f9454d33caf79f89708cab9e46ec996eeb (diff)
parent7b350fbf497d737c12cc03ddd888bb6a0ee486e4 (diff)
downloadhercules-d2f666fc10eac20f70729176c088b2c81d233531.tar.gz
hercules-d2f666fc10eac20f70729176c088b2c81d233531.tar.bz2
hercules-d2f666fc10eac20f70729176c088b2c81d233531.tar.xz
hercules-d2f666fc10eac20f70729176c088b2c81d233531.zip
Merge pull request #1336 from 4144/travisext
Different travis extensions
Diffstat (limited to 'src/char/char.c')
-rw-r--r--src/char/char.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/char/char.c b/src/char/char.c
index cf2f7d87c..5f92e37bf 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -5758,11 +5758,25 @@ static CMDLINEARG(netconfig)
chr->NET_CONF_NAME = aStrdup(params);
return true;
}
+
+/**
+ * --run-once handler
+ *
+ * Causes the server to run its loop once, and shutdown. Useful for testing.
+ * @see cmdline->exec
+ */
+static CMDLINEARG(runonce)
+{
+ core->runflag = CORE_ST_STOP;
+ return true;
+}
+
/**
* Initializes the command line arguments handlers.
*/
void cmdline_args_init_local(void)
{
+ CMDLINEARG_DEF2(run-once, runonce, "Closes server after loading (testing).", CMDLINE_OPT_NORMAL);
CMDLINEARG_DEF2(char-config, charconfig, "Alternative char-server configuration.", CMDLINE_OPT_PARAM);
CMDLINEARG_DEF2(inter-config, interconfig, "Alternative inter-server configuration.", CMDLINE_OPT_PARAM);
CMDLINEARG_DEF2(net-config, netconfig, "Alternative network configuration.", CMDLINE_OPT_PARAM);
@@ -5801,11 +5815,13 @@ int do_init(int argc, char **argv) {
sockt->net_config_read(chr->NET_CONF_NAME);
chr->sql_config_read(chr->SQL_CONF_NAME);
+#ifndef BUILDBOT
if (strcmp(chr->userid, "s1")==0 && strcmp(chr->passwd, "p1")==0) {
ShowWarning("Using the default user/password s1/p1 is NOT RECOMMENDED.\n");
ShowNotice("Please edit your 'login' table to create a proper inter-server user/password (gender 'S')\n");
ShowNotice("And then change the user/password to use in conf/char-server.conf (or conf/import/char_conf.txt)\n");
}
+#endif
inter->init_sql(chr->INTER_CONF_NAME); // inter server configuration