summaryrefslogtreecommitdiff
path: root/src/common/core.h
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-01-12 18:29:24 +0100
committerHaru <haru@dotalux.com>2015-01-12 18:35:36 +0100
commit4fa9fd843e19d041a6b142722e1f2c717a45f625 (patch)
tree5271cda69234c97a07a1ed9f2f6ef8510bdf94ac /src/common/core.h
parentfe00cc320396bc7ac301a22592b718792ae49adf (diff)
downloadhercules-4fa9fd843e19d041a6b142722e1f2c717a45f625.tar.gz
hercules-4fa9fd843e19d041a6b142722e1f2c717a45f625.tar.bz2
hercules-4fa9fd843e19d041a6b142722e1f2c717a45f625.tar.xz
hercules-4fa9fd843e19d041a6b142722e1f2c717a45f625.zip
Blocked compilation of plugins that use unavailable functions
- Rather than failing at runtime, plugins that try to access non-interfaced, unavailable functions or variables, will now show an error at compile-time. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common/core.h')
-rw-r--r--src/common/core.h30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/common/core.h b/src/common/core.h
index a8337e1b9..025f636e9 100644
--- a/src/common/core.h
+++ b/src/common/core.h
@@ -13,15 +13,8 @@
# include <signal.h>
#endif
-extern int arg_c;
-extern char **arg_v;
-
#define HERC_UNKNOWN_VER '\x02'
-/// @see E_CORE_ST
-extern int runflag;
-extern char *SERVER_NAME;
-
enum server_types {
SERVER_TYPE_UNKNOWN = 0x0,
SERVER_TYPE_LOGIN = 0x1,
@@ -29,13 +22,6 @@ enum server_types {
SERVER_TYPE_MAP = 0x4,
};
-enum server_types SERVER_TYPE;
-
-extern int do_init(int,char**);
-extern void set_server_type(void);
-extern void do_abort(void);
-extern int do_final(void);
-
/// The main loop continues until runflag is CORE_ST_STOP
enum E_CORE_ST {
CORE_ST_STOP = 0,
@@ -43,8 +29,24 @@ enum E_CORE_ST {
CORE_ST_LAST
};
+#ifdef HERCULES_CORE
+extern int arg_c;
+extern char **arg_v;
+
+/// @see E_CORE_ST
+extern int runflag;
+extern char *SERVER_NAME;
+
+enum server_types SERVER_TYPE;
+
+extern int do_init(int,char**);
+extern void set_server_type(void);
+extern void do_abort(void);
+extern int do_final(void);
+
/// Called when a terminate signal is received. (Ctrl+C pressed)
/// If NULL, runflag is set to CORE_ST_STOP instead.
extern void (*shutdown_callback)(void);
+#endif // HERCULES_CORE
#endif /* COMMON_CORE_H */