diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | src/Makefile.am | 4 | ||||
-rw-r--r-- | src/login/config.c | 21 | ||||
-rw-r--r-- | src/login/config.h | 9 | ||||
-rw-r--r-- | src/login/init.c | 2 |
5 files changed, 36 insertions, 2 deletions
@@ -29,7 +29,7 @@ po/*.po~ # files created by configure Makefile -config.h +/config.h config.log config.status config.status.lineno diff --git a/src/Makefile.am b/src/Makefile.am index 33a36b3..35f94a4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,7 +2,9 @@ AUTOMAKE_OPTIONS = subdir-objects CHAR_SRC = char/init.c -LOGIN_SRC = login/init.c \ +LOGIN_SRC = login/config.c \ + login/config.h \ + login/init.c \ login/parse.c \ login/parse.h diff --git a/src/login/config.c b/src/login/config.c new file mode 100644 index 0000000..02d3d12 --- /dev/null +++ b/src/login/config.c @@ -0,0 +1,21 @@ +// Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// Copyright (c) 2014 Evol developers + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "../../../common/HPMi.h" +#include "../../../common/malloc.h" +#include "../../../common/mmo.h" +#include "../../../common/socket.h" +#include "../../../common/strlib.h" + +#include "login/config.h" + +char *update_server = NULL; + +void config_update_server(const char *val) +{ + update_server = val; +} diff --git a/src/login/config.h b/src/login/config.h new file mode 100644 index 0000000..6e76c54 --- /dev/null +++ b/src/login/config.h @@ -0,0 +1,9 @@ +// Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// Copyright (c) 2014 Evol developers + +#ifndef EVOL_LOGIN_CONFIG +#define EVOL_LOGIN_CONFIG + +void config_update_server(const char *val); + +#endif // EVOL_LOGIN_CONFIG diff --git a/src/login/init.c b/src/login/init.c index f91af61..da2afb5 100644 --- a/src/login/init.c +++ b/src/login/init.c @@ -12,6 +12,7 @@ #include "../../../common/strlib.h" #include "../../../login/login.h" +#include "login/config.h" #include "login/parse.h" #include "../../../common/HPMDataCheck.h" /* should always be the last file included! (if you don't make it last, it'll intentionally break compile time) */ @@ -35,6 +36,7 @@ HPExport void plugin_init (void) { } HPExport void server_preinit (void) { + addLoginConf("update_server", config_update_server); } HPExport void server_online (void) { |