summaryrefslogtreecommitdiff
path: root/conf
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-09-07 01:42:31 +0200
committerHaru <haru@dotalux.com>2016-08-19 21:32:13 +0200
commitea9ceb17bdf4ea4acf28dca84508b62bd7e94fd4 (patch)
treed122655c806ae3a9dfea3688e6837da6272ffc7d /conf
parent9783ce1d536d0f3f5d7e34d90717a65779ff923a (diff)
downloadhercules-ea9ceb17bdf4ea4acf28dca84508b62bd7e94fd4.tar.gz
hercules-ea9ceb17bdf4ea4acf28dca84508b62bd7e94fd4.tar.bz2
hercules-ea9ceb17bdf4ea4acf28dca84508b62bd7e94fd4.tar.xz
hercules-ea9ceb17bdf4ea4acf28dca84508b62bd7e94fd4.zip
Ported inter-server.conf to libconfig
Ported to modern Hercules and cleaned up from Panikon's commits: 40f9ec33868e2240cab013308897898ed252b3e0, a9d646da19e25ab6fcf44dbd1ae7d90c30f6686c, 1aa8581a0aecbfd53e877686c399ffb731dcd75e, 72c645b015ae6130ca7d4309d0fb1413340e7f23, f8c906a0496b9acdae1d8244b1544fa03592061e, 51d88a58983c9552dfd1a0f059e5a031742aed61, 443684b3c77f4c32fe7877a7f8d62debf73b1e93, cf93eafef1f322cd1583226272b7d4008f562da4 Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'conf')
-rw-r--r--conf/char/char-server.conf1
-rw-r--r--conf/common/inter-server.conf119
-rw-r--r--conf/global/sql_connection.conf49
-rw-r--r--conf/import-tmpl/inter-server.conf32
-rw-r--r--conf/import-tmpl/inter_conf.txt0
-rw-r--r--conf/inter-server.conf125
6 files changed, 201 insertions, 125 deletions
diff --git a/conf/char/char-server.conf b/conf/char/char-server.conf
index 576925872..4c6ef0348 100644
--- a/conf/char/char-server.conf
+++ b/conf/char/char-server.conf
@@ -29,6 +29,7 @@
char_configuration: {
@include "conf/global/console.conf"
+ @include "conf/global/sql_connection.conf"
// Server name, use alternative character such as ASCII 160 for spaces.
// NOTE: Do not use spaces or any of these characters which are not allowed in
diff --git a/conf/common/inter-server.conf b/conf/common/inter-server.conf
new file mode 100644
index 000000000..fd55b27e5
--- /dev/null
+++ b/conf/common/inter-server.conf
@@ -0,0 +1,119 @@
+//================= Hercules Configuration ================================
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
+//= | | | | __/ | | (__| |_| | | __/\__ \
+//= \_| |_/\___|_| \___|\__,_|_|\___||___/
+//================= License ===============================================
+//= This file is part of Hercules.
+//= http://herc.ws - http://github.com/HerculesWS/Hercules
+//=
+//= Copyright (C) 2014-2016 Hercules Dev Team
+//=
+//= Hercules is free software: you can redistribute it and/or modify
+//= it under the terms of the GNU General Public License as published by
+//= the Free Software Foundation, either version 3 of the License, or
+//= (at your option) any later version.
+//=
+//= This program is distributed in the hope that it will be useful,
+//= but WITHOUT ANY WARRANTY; without even the implied warranty of
+//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//= GNU General Public License for more details.
+//=
+//= You should have received a copy of the GNU General Public License
+//= along with this program. If not, see <http://www.gnu.org/licenses/>.
+//=========================================================================
+//= Hercules Inter Server configuration file.
+//=========================================================================
+// Settings that are shared by more than one of the main servers
+//=========================================================================
+
+inter_configuration: {
+ // Level range for sharing within a party
+ party_share_level: 15 // FIXME: Split RE and pre-RE
+
+ // Log configuration
+ log: {
+ // Log Inter Connections, etc.?
+ log_inter: true
+
+ // Inter Log Filename
+ inter_log_filename: "log/inter.log"
+
+ // Log database SQL connection
+ @include "conf/global/sql_connection.conf"
+ }
+
+ mysql_reconnect: {
+ // == MySQL Reconnect Settings
+ // ===========================
+ // - mysql_reconnect_type
+ // - 1: when mysql disconnects during runtime, the server tries to reconnect mysql_reconnect_count times and,
+ // -- if unsuccessful, the server is shut down
+ // - 2: when mysql disconnects during runtime it tries to reconnect indefinitely
+ type: 2
+
+ // - mysql_reconnect_count
+ // - number of reconnect attempts the server should do when the database disconnects during runtime
+ // - only used when mysql_reconnect_type is 1
+ count: 1
+ }
+
+ // ALL MySQL Database Table names
+ // DO NOT CHANGE ANYTHING BEYOND THIS LINE UNLESS YOU KNOW YOUR DATABASE DAMN WELL
+ // this is meant for people who KNOW their stuff, and for some reason want to change their
+ // database layout. [CLOWNISIUS]
+ database_names: {
+ char_db: "char"
+ interlog_db: "interlog"
+ ragsrvinfo_db: "ragsrvinfo"
+ registry: {
+ acc_reg_num_db: "acc_reg_num_db"
+ acc_reg_str_db: "acc_reg_str_db"
+ char_reg_str_db: "char_reg_str_db"
+ char_reg_num_db: "char_reg_num_db"
+
+ global_acc_reg_num_db: "global_acc_reg_num_db"
+ global_acc_reg_str_db: "global_acc_reg_str_db"
+ }
+ pc: {
+ hotkey_db: "hotkey"
+ scdata_db: "sc_data"
+ cart_db: "cart_inventory"
+ inventory_db: "inventory"
+ charlog_db: "charlog"
+ storage_db: "storage"
+ skill_db: "skill"
+ memo_db: "memo"
+ party_db: "party"
+ pet_db: "pet"
+ friend_db: "friends"
+ mail_db: "mail"
+ auction_db: "auction"
+ quest_db: "quest"
+ homunculus_db: "homunculus"
+ skill_homunculus_db: "skill_homunculus"
+ mercenary_db: "mercenary"
+ mercenary_owner_db: "mercenary_owner"
+ elemental_db: "elemental"
+ account_data_db: "account_data"
+ }
+ guild: {
+ main_db: "guild"
+ alliance_db: "guild_alliance"
+ castle_db: "guild_castle"
+ expulsion_db: "guild_expulsion"
+ member_db: "guild_member"
+ skill_db: "guild_skill"
+ position_db: "guild_position"
+ storage_db: "guild_storage"
+ }
+ mapreg_db: "mapreg"
+ autotrade_merchants_db: "autotrade_merchants"
+ autotrade_data_db: "autotrade_data"
+ npc_market_data_db: "npc_market_data"
+ }
+}
+
+import: "conf/import/inter-server.conf"
diff --git a/conf/global/sql_connection.conf b/conf/global/sql_connection.conf
new file mode 100644
index 000000000..58c9e6d08
--- /dev/null
+++ b/conf/global/sql_connection.conf
@@ -0,0 +1,49 @@
+//================= Hercules Configuration ================================
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
+//= | | | | __/ | | (__| |_| | | __/\__ \
+//= \_| |_/\___|_| \___|\__,_|_|\___||___/
+//================= License ===============================================
+//= This file is part of Hercules.
+//= http://herc.ws - http://github.com/HerculesWS/Hercules
+//=
+//= Copyright (C) 2014-2016 Hercules Dev Team
+//=
+//= Hercules is free software: you can redistribute it and/or modify
+//= it under the terms of the GNU General Public License as published by
+//= the Free Software Foundation, either version 3 of the License, or
+//= (at your option) any later version.
+//=
+//= This program is distributed in the hope that it will be useful,
+//= but WITHOUT ANY WARRANTY; without even the implied warranty of
+//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//= GNU General Public License for more details.
+//=
+//= You should have received a copy of the GNU General Public License
+//= along with this program. If not, see <http://www.gnu.org/licenses/>.
+//=========================================================================
+//= SQL connection configuration file.
+//=========================================================================
+// This file affects how ALL server sql connections work, unless explictly
+// defined so in the server configuration file (See
+// doc/global_configuration.txt for more information).
+//=========================================================================
+
+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: ""
+
+ // 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/conf/import-tmpl/inter-server.conf b/conf/import-tmpl/inter-server.conf
new file mode 100644
index 000000000..243dda4ea
--- /dev/null
+++ b/conf/import-tmpl/inter-server.conf
@@ -0,0 +1,32 @@
+//================= Hercules Configuration ================================
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
+//= | | | | __/ | | (__| |_| | | __/\__ \
+//= \_| |_/\___|_| \___|\__,_|_|\___||___/
+//================= License ===============================================
+//= This file is part of Hercules.
+//= http://herc.ws - http://github.com/HerculesWS/Hercules
+//=
+//= Copyright (C) 2014-2016 Hercules Dev Team
+//=
+//= Hercules is free software: you can redistribute it and/or modify
+//= it under the terms of the GNU General Public License as published by
+//= the Free Software Foundation, either version 3 of the License, or
+//= (at your option) any later version.
+//=
+//= This program is distributed in the hope that it will be useful,
+//= but WITHOUT ANY WARRANTY; without even the implied warranty of
+//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//= GNU General Public License for more details.
+//=
+//= You should have received a copy of the GNU General Public License
+//= along with this program. If not, see <http://www.gnu.org/licenses/>.
+//=========================================================================
+//= Hercules Inter Server local configuration file.
+//=========================================================================
+
+inter_configuration: {
+ // See conf/common/inter-server.conf
+}
diff --git a/conf/import-tmpl/inter_conf.txt b/conf/import-tmpl/inter_conf.txt
deleted file mode 100644
index e69de29bb..000000000
--- a/conf/import-tmpl/inter_conf.txt
+++ /dev/null
diff --git a/conf/inter-server.conf b/conf/inter-server.conf
deleted file mode 100644
index 704d5fc12..000000000
--- a/conf/inter-server.conf
+++ /dev/null
@@ -1,125 +0,0 @@
-// Hercules InterServer (settings shared/used by more than 1 server) configuration.
-
-// Options for both versions
-
-// Log Inter Connections, etc.?
-log_inter: 1
-
-// Inter Log Filename
-inter_log_filename: log/inter.log
-
-// Level range for sharing within a party
-party_share_level: 15
-
-// SQL version options only
-
-// You can specify the codepage to use in your mySQL tables here.
-// (Note that this feature requires MySQL 4.1+)
-//default_codepage:
-
-
-// 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
-
-// Global SQL settings
-// overridden by local settings when the hostname is defined there
-// (currently only the login-server reads/obeys these settings)
-sql.db_hostname: 127.0.0.1
-sql.db_port: 3306
-sql.db_username: ragnarok
-sql.db_password: ragnarok
-sql.db_database: ragnarok
-sql.codepage:
-
-// MySQL Character SQL server
-char_server_ip: 127.0.0.1
-char_server_port: 3306
-char_server_id: ragnarok
-char_server_pw: ragnarok
-char_server_db: ragnarok
-
-// MySQL Map SQL Server
-map_server_ip: 127.0.0.1
-map_server_port: 3306
-map_server_id: ragnarok
-map_server_pw: ragnarok
-map_server_db: ragnarok
-
-// MySQL Log SQL Database
-log_db_ip: 127.0.0.1
-log_db_port: 3306
-log_db_id: ragnarok
-log_db_pw: ragnarok
-log_db_db: ragnarok
-log_codepage:
-log_login_db: loginlog
-
-// == MySQL Reconnect Settings
-// ===========================
-// - mysql_reconnect_type
-// - 1: when mysql disconnects during runtime, the server tries to reconnect mysql_reconnect_count times and,
-// -- if unsuccessful, the server is shut down
-// - 2: when mysql disconnects during runtime it tries to reconnect indefinitely
-mysql_reconnect_type:2
-// - mysql_reconnect_count
-// - number of reconnect attempts the server should do when the database disconnects during runtime
-// - only used when mysql_reconnect_type is 1
-mysql_reconnect_count:1
-
-// DO NOT CHANGE ANYTHING BEYOND THIS LINE UNLESS YOU KNOW YOUR DATABASE DAMN WELL
-// this is meant for people who KNOW their stuff, and for some reason want to change their
-// database layout. [CLOWNISIUS]
-
-// ALL MySQL Database Table names
-
-//Shared
-interreg_db: interreg
-global_acc_reg_num_db: global_acc_reg_num_db
-global_acc_reg_str_db: global_acc_reg_str_db
-
-// Char Database Tables
-char_db: char
-hotkey_db: hotkey
-scdata_db: sc_data
-cart_db: cart_inventory
-inventory_db: inventory
-charlog_db: charlog
-storage_db: storage
-skill_db: skill
-interlog_db: interlog
-memo_db: memo
-guild_db: guild
-guild_alliance_db: guild_alliance
-guild_castle_db: guild_castle
-guild_expulsion_db: guild_expulsion
-guild_member_db: guild_member
-guild_skill_db: guild_skill
-guild_position_db: guild_position
-guild_storage_db: guild_storage
-party_db: party
-pet_db: pet
-friend_db: friends
-mail_db: mail
-auction_db: auction
-quest_db: quest
-homunculus_db: homunculus
-skill_homunculus_db: skill_homunculus
-mercenary_db: mercenary
-mercenary_owner_db: mercenary_owner
-ragsrvinfo_db: ragsrvinfo
-elemental_db: elemental
-account_data_db: account_data
-acc_reg_num_db: acc_reg_num_db
-acc_reg_str_db: acc_reg_str_db
-char_reg_str_db: char_reg_str_db
-char_reg_num_db: char_reg_num_db
-
-// Map Database Tables
-mapreg_db: mapreg
-autotrade_merchants_db: autotrade_merchants
-autotrade_data_db: autotrade_data
-npc_market_data_db: npc_market_data
-
-import: conf/import/inter_conf.txt