summaryrefslogtreecommitdiff
path: root/src/plugins/sample.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-08-11 01:47:15 +0200
committerHaru <haru@dotalux.com>2015-08-13 17:16:26 +0200
commit5825aea88ecb43856d63a345aeb49ae72150af15 (patch)
tree22c6a0fe4b6cb4ef1e4c92a50e6e9f4c297996a9 /src/plugins/sample.c
parente3f34b0d2d977b25846013207b26c87c83c108b8 (diff)
downloadhercules-5825aea88ecb43856d63a345aeb49ae72150af15.tar.gz
hercules-5825aea88ecb43856d63a345aeb49ae72150af15.tar.bz2
hercules-5825aea88ecb43856d63a345aeb49ae72150af15.tar.xz
hercules-5825aea88ecb43856d63a345aeb49ae72150af15.zip
Added core HPM interface
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/plugins/sample.c')
-rw-r--r--src/plugins/sample.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/plugins/sample.c b/src/plugins/sample.c
index 58be9c05f..275edb129 100644
--- a/src/plugins/sample.c
+++ b/src/plugins/sample.c
@@ -117,22 +117,15 @@ void parse_my_setting(const char *val) {
}
/* run when server starts */
HPExport void plugin_init (void) {
- char *server_type;
- char *server_name;
+ ShowInfo("Server type is ");
- /* core vars */
- server_type = GET_SYMBOL("SERVER_TYPE"); // FIXME
- server_name = GET_SYMBOL("SERVER_NAME"); // FIXME
-
- ShowInfo ("Server type is ");
-
- switch (*server_type) {
- case SERVER_TYPE_LOGIN: printf ("Login Server\n"); break;
- case SERVER_TYPE_CHAR: printf ("Char Server\n"); break;
+ switch (SERVER_TYPE) {
+ case SERVER_TYPE_LOGIN: printf("Login Server\n"); break;
+ case SERVER_TYPE_CHAR: printf("Char Server\n"); break;
case SERVER_TYPE_MAP: printf ("Map Server\n"); break;
}
- ShowInfo ("I'm being run from the '%s' filename\n", server_name);
+ ShowInfo("I'm being run from the '%s' filename\n", SERVER_NAME);
/* addAtcommand("command-key",command-function) tells map server to call ACMD(sample) when "sample" command is used */
/* - it will print a warning when used on a non-map-server plugin */