aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/conf_merge/README9
-rw-r--r--contrib/conf_merge/tc-conf-merger.pl43
-rw-r--r--src/server/authserver/authserver.conf.dist10
-rw-r--r--src/server/worldserver/worldserver.conf.dist21
4 files changed, 62 insertions, 21 deletions
diff --git a/contrib/conf_merge/README b/contrib/conf_merge/README
index 3d027b7ad42..974c1063064 100644
--- a/contrib/conf_merge/README
+++ b/contrib/conf_merge/README
@@ -1,6 +1,13 @@
-This is a PHP script for merging a new .dist file with your existing .conf file (trinitycore and trinityrealm)
+==== PHP merger (index.php + merge.php) ====
+
+This is a PHP script for merging a new .dist file with your existing .conf file (worldserver.conf.dist and authserver.conf.dist)
It should also work with mangos dist/conf files as well.
It uses sessions so it is multi user safe, it adds any options that are removed to the bottom of the file,
commented out, just in case it removes something it shouldn't,
and, if you add all of your custom patch configs below "# Custom" they will be copied exactly as they are.
+
+==== Perl merger (tc-conf-merger.pl) ====
+
+Perl based command line merger script. This script feeds a .conf.dist file with variables that exist in an old .conf file,
+comments and custom options are ignored.
diff --git a/contrib/conf_merge/tc-conf-merger.pl b/contrib/conf_merge/tc-conf-merger.pl
new file mode 100644
index 00000000000..a6589b5c674
--- /dev/null
+++ b/contrib/conf_merge/tc-conf-merger.pl
@@ -0,0 +1,43 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+# Author: leak
+# Date: 2010-12-06
+# Note: Based on conf file format of rev 10507
+
+use strict;
+
+if (@ARGV != 3)
+{
+ print("Usage:\ntc-conf-merger.pl <path to new .conf.dist> <path to old .conf> <path to output .conf>\n");
+ exit(1);
+}
+
+if (! -e $ARGV[0])
+{
+ print("No file found at: ".$ARGV[0]);
+ exit(1);
+}
+elsif (! -e $ARGV[1])
+{
+ print("No file found at: ".$ARGV[1]);
+ exit(1);
+}
+
+open CONFDIST, "<", $ARGV[0] or die "Error: Could not open ".$ARGV[0]."\n";
+my $confdist = join "", <CONFDIST>;
+close CONFDIST;
+
+open CONFOLD, "<", $ARGV[1] or die "Error: Could not open ".$ARGV[1]."\n";
+my $confold = join "", <CONFOLD>;
+close CONFOLD;
+
+while ($confold =~ m/^(?!#)(.*?)\s+?=\s+?(.*?)$/mg) {
+ my $key = $1, my $value = $2;
+ $confdist =~ s/^(\Q$key\E)(\s+?=\s+?)(.*)/$1$2$value/mg;
+}
+
+open OUTPUT, ">", $ARGV[2] or die "Error: Could not open ".$ARGV[2]."\n";
+binmode(OUTPUT);
+print OUTPUT $confdist;
+close OUTPUT;
diff --git a/src/server/authserver/authserver.conf.dist b/src/server/authserver/authserver.conf.dist
index 6f1af3e2d8d..aecb0ec1424 100644
--- a/src/server/authserver/authserver.conf.dist
+++ b/src/server/authserver/authserver.conf.dist
@@ -41,7 +41,7 @@ LogsDir = ""
#
# MaxPingTime
# Description: Time (in minutes) between database pings.
-# Default: 30 - (minutes)
+# Default: 30
MaxPingTime = 30
@@ -225,16 +225,16 @@ LoginDatabaseInfo = "127.0.0.1;3306;trinity;trinity;auth"
# LoginDatabase.WorkerThreads
# Description: The amount of worker threads spawned to handle asynchronous (delayed) MySQL
# statements.
-# Default: 1 - (LoginDatabase.WorkerThreads)
+# Default: 1
-LoginDatabase.WorkerThreads = 1
+LoginDatabase.WorkerThreads = 1
#
# LoginDatabase.Connections
# Description: The amount of MySQL connections spawned.
-# Default: 1
+# Default: 1
-LoginDatabase.Connections = 1
+LoginDatabase.Connections = 1
#
###################################################################################################
diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist
index 3721c78e78a..0e3654a9744 100644
--- a/src/server/worldserver/worldserver.conf.dist
+++ b/src/server/worldserver/worldserver.conf.dist
@@ -119,7 +119,7 @@ CharacterDatabase.Connections = 2
#
# MaxPingTime
# Description: Time (in minutes) between database pings.
-# Default: 30 - (minutes)
+# Default: 30
MaxPingTime = 30
@@ -390,16 +390,6 @@ CleanCharacterDB = 0
###################################################################################################
# SERVER LOGGING
#
-# LogSQL
-# Description: Enable logging of SQL queries triggered by in game commands from in game
-# All commands are written to a file: YYYY-MM-DD_logSQL.sql
-# A new file will be created every day at 00:00:00.
-# Default: 1 - (Enabled)
-# 0 - (Disabled)
-
-LogSQL = 1
-
-#
# PidFile
# Description: World daemon PID file
# Example: "./worldd.pid" - (Enabled)
@@ -1370,7 +1360,7 @@ DungeonFinder.Enable = 0
#
# DBC.EnforceItemAttributes
-# Description: Disallow overriding item attributes stored in DBC files with values from the
+# Description: Disallow overriding item attributes stored in DBC files with values from the
# database.
# Default: 1 - (Enabled, Enforce DBC values)
# 0 - (Disabled, Use database values)
@@ -1640,6 +1630,7 @@ ListenRange.TextEmote = 40
# Default: 300
ListenRange.Yell = 300
+
#
###################################################################################################
@@ -1747,7 +1738,7 @@ AllowPlayerCommands = 1
#
# PreserveCustomChannels
# Description: Store custom chat channel settings like password, automatic ownership handout
-# or ban list in the database. Needs to be enabled to save custom
+# or ban list in the database. Needs to be enabled to save custom
# world/trade/etc. channels that have automatic ownership handout disabled.
# (.channel set ownership $channel off)
# Default: 0 - (Disabled, Blizzlike, Channel settings are lost if last person left)
@@ -1926,7 +1917,7 @@ Visibility.Distance.BGArenas = 180
Visibility.Notify.Period.OnContinents = 1000
Visibility.Notify.Period.InInstances = 1000
-Visibility.Notify.Period.InBGArenas = 1000
+Visibility.Notify.Period.InBGArenas = 1000
#
###################################################################################################
@@ -2083,7 +2074,7 @@ Rate.Mining.Amount = 1
# Description: Mining rates.
# Default: Chance to to mine a deposit again.
-Rate.Mining.Next = 1
+Rate.Mining.Next = 1
#
# Rate.Talent