summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-10-22 00:30:06 +0200
committerGitHub <noreply@github.com>2018-10-22 00:30:06 +0200
commitc88c3d485e6471c09b87f596ef735dde2b975d1b (patch)
tree3a68efdc3827c7de7c3a9e2a69c32c2c2052529a
parent1b11cd930df89f322419fa57917e91f625d8dd1b (diff)
parent029f0cec19c633fda93ed6ce69d5bdeee8255980 (diff)
downloadhercules-c88c3d485e6471c09b87f596ef735dde2b975d1b.tar.gz
hercules-c88c3d485e6471c09b87f596ef735dde2b975d1b.tar.bz2
hercules-c88c3d485e6471c09b87f596ef735dde2b975d1b.tar.xz
hercules-c88c3d485e6471c09b87f596ef735dde2b975d1b.zip
Merge pull request #2229 from linton-dawson/branch1
global_configuration.md
-rw-r--r--doc/global_configuration.md65
-rw-r--r--doc/global_configuration.txt69
2 files changed, 65 insertions, 69 deletions
diff --git a/doc/global_configuration.md b/doc/global_configuration.md
new file mode 100644
index 000000000..b0e99e698
--- /dev/null
+++ b/doc/global_configuration.md
@@ -0,0 +1,65 @@
+# Global configuration reference
+
+## What is global configuration?
+
+Global configuration is an import system that allows configuration files to be
+shared between servers (login, char, map), but can also be used independently
+in each server.
+
+
+## How does it work?
+
+It works by using the `@include` directive from libconfig:
+
+> "A configuration file may "include" the contents of another file using an
+> include directive. This directive has the effect of inlining the contents of
+> the named file at the point of inclusion.
+
+An include directive must appear on its own line and takes this form:
+
+```
+ @include "filename"
+```
+
+Any backslashes or double quotes in the filename must be escaped as `\\` and
+`\"`, respectively.
+
+
+## How do I stop using global configurations?
+
+To stop using global configuration, all you have to do is copy the contents of
+the file being imported and paste it _exactly_ where the include directive was.
+
+### Example
+
+If you want map server and char server to have their own separate SQL connection
+settings, you would search in `conf/map/map-server.conf` and
+`conf/char/char-server.conf` for this line:
+
+```
+ @include "conf/global/sql_connection.conf"
+```
+
+And replace it with:
+
+```
+ sql_connection: {
+ // [INTER] You can specify the codepage to use in your mySQL tables here.
+ // (Note that this feature requires MySQL 4.1+)
+ //default_codepage: ""
+
+ // [LOGIN] Is `userid` in account_db case sensitive?
+ //case_sensitive: false
+
+ // For IPs, ideally under linux, you want to use localhost instead of 127.0.0.1.
+ // Under windows, you want to use 127.0.0.1. If you see a message like
+ // "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)"
+ // and you have localhost, switch it to 127.0.0.1
+ db_hostname: "127.0.0.1"
+ db_port: 3306
+ db_username: "ragnarok"
+ db_password: "ragnarok"
+ db_database: "ragnarok"
+ //codepage:""
+ }
+```
diff --git a/doc/global_configuration.txt b/doc/global_configuration.txt
deleted file mode 100644
index a000a4572..000000000
--- a/doc/global_configuration.txt
+++ /dev/null
@@ -1,69 +0,0 @@
-//===== Hercules Documentation ===============================
-//= Global configuration reference
-//===== By: ==================================================
-//= Panikon (Hercules Dev. Team)
-//===== Current Version: =====================================
-//= 20140616
-//===== Description: =========================================
-//= Global configurations found in conf/global/
-//============================================================
-
-- What are global configurations?
-
-Global configurations are configurations that can be shared between servers,
-but can also be set independently in each server.
-
-- How do they work?
-
-They work by using an include system that is available with libconfig:
-
- "A configuration file may "include" the contents of another file using an
- include directive. This directive has the effect of inlining the contents of
- the named file at the point of inclusion.
-
- An include directive must appear on its own line in the input. It has the
- form:
-
- @include "filename"
-
- Any backslashes or double quotes in the filename must be escaped as '\\' and
- '\"', respectively."
- From libconfig's documentation
-
-So each file that is included is actually inside each one of the main
-configuration files and thus a change in the first will be a change in the
-latter.
-Note: the @include directive is read by the server executable, so any path
-should be from were it is and NOT from where the main configuration file is!
-
-- How do I stop using global configurations?
-
-To stop using global configurations is very simple, all you have to do is copy
-the contents that are inside the global configuration file and put them
-_exactly_ where the include directive were in the main configuration file.
-
-E.g.
- Find in any file:
- @include "conf/global/sql_connection.conf"
- Replace it with:
- sql_connection: {
- // [INTER] You can specify the codepage to use in your mySQL tables here.
- // (Note that this feature requires MySQL 4.1+)
- //default_codepage: ""
-
- // [LOGIN] Is `userid` in account_db case sensitive?
- //case_sensitive: false
-
- // For IPs, ideally under linux, you want to use localhost instead of 127.0.0.1
- // Under windows, you want to use 127.0.0.1. If you see a message like
- // "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)"
- // and you have localhost, switch it to 127.0.0.1
- db_hostname: "127.0.0.1"
- db_port: 3306
- db_username: "ragnarok"
- db_password: "ragnarok"
- db_database: "ragnarok"
- //codepage:""
- }
- If the main configuration file belongs to the map server, for instance, you
- don't need to include default_codepage and case_sensitive.