diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-11-10 16:29:56 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-11-10 16:31:29 +0300 |
commit | 05c7af3f7b93a0cab5a00c3930e55747452de410 (patch) | |
tree | 6e52ad3b7cbc80ad14519a6bd8073f702f63ef8f | |
parent | cba87b5adc4a38af6b49217c7aaa4a6a6b1f25ab (diff) | |
download | evol-hercules-05c7af3f7b93a0cab5a00c3930e55747452de410.tar.gz evol-hercules-05c7af3f7b93a0cab5a00c3930e55747452de410.tar.bz2 evol-hercules-05c7af3f7b93a0cab5a00c3930e55747452de410.tar.xz evol-hercules-05c7af3f7b93a0cab5a00c3930e55747452de410.zip |
In login server add support for reading update_server config option.
-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) { |