summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/char/char.c3
-rw-r--r--src/common/HPM.c5
-rw-r--r--src/login/account_sql.c2
-rw-r--r--src/map/map.c7
4 files changed, 14 insertions, 3 deletions
diff --git a/src/char/char.c b/src/char/char.c
index b38e3e6c0..b6ea8e2f6 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -5023,8 +5023,9 @@ int do_init(int argc, char **argv) {
}
Sql_HerculesUpdateCheck(sql_handle);
+#ifdef CONSOLE_INPUT
console->setSQL(sql_handle);
-
+#endif
ShowStatus("The char-server is "CL_GREEN"ready"CL_RESET" (Server is listening on the port %d).\n\n", char_port);
if( runflag != CORE_ST_STOP )
diff --git a/src/common/HPM.c b/src/common/HPM.c
index 9283360dc..53059d224 100644
--- a/src/common/HPM.c
+++ b/src/common/HPM.c
@@ -255,7 +255,9 @@ void hplugins_config_read(void) {
}
void hplugins_share_defaults(void) {
/* console */
+#ifdef CONSOLE_INPUT
HPM->share(console->addCommand,"addCPCommand");
+#endif
/* core */
HPM->share(&runflag,"runflag");
HPM->share(arg_v,"arg_v");
@@ -311,8 +313,9 @@ void hpm_init(void) {
}
HPM->symbol_defaults();
+#ifdef CONSOLE_INPUT
console->addCommand("plugins",CPCMD_A(plugins));
-
+#endif
return;
}
diff --git a/src/login/account_sql.c b/src/login/account_sql.c
index 53785f39f..218248c82 100644
--- a/src/login/account_sql.c
+++ b/src/login/account_sql.c
@@ -690,5 +690,7 @@ static bool mmo_auth_tosql(AccountDB_SQL* db, const struct mmo_account* acc, boo
void account_db_sql_up(AccountDB* self) {
AccountDB_SQL* db = (AccountDB_SQL*)self;
Sql_HerculesUpdateCheck(db->accounts);
+#ifdef CONSOLE_INPUT
console->setSQL(db->accounts);
+#endif
}
diff --git a/src/map/map.c b/src/map/map.c
index 6ed692cee..68ac650c7 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -5227,6 +5227,7 @@ CPCMD(gm_use) {
}
/* Hercules Console Parser */
void map_cp_defaults(void) {
+#ifdef CONSOLE_INPUT
/* default HCP data */
memset(&cpsd, 0, sizeof(struct map_session_data));
strcpy(cpsd.status.name, "Hercules Console");
@@ -5236,6 +5237,7 @@ void map_cp_defaults(void) {
console->addCommand("gm:info",CPCMD_A(gm_position));
console->addCommand("gm:use",CPCMD_A(gm_use));
+#endif
}
/* Hercules Plugin Mananger */
void map_hp_symbols(void) {
@@ -5509,8 +5511,11 @@ int do_init(int argc, char *argv[])
ShowNotice("Server is running on '"CL_WHITE"PK Mode"CL_RESET"'.\n");
Sql_HerculesUpdateCheck(mmysql_handle);
+
+#ifdef CONSOLE_INPUT
console->setSQL(mmysql_handle);
-
+#endif
+
ShowStatus("Server is '"CL_GREEN"ready"CL_RESET"' and listening on port '"CL_WHITE"%d"CL_RESET"'.\n\n", map_port);
if( runflag != CORE_ST_STOP ) {