Ueland / VikingBot

Vikingbot is yet another simple PHP based IRC bot with support for plugins and secure IRC servers. The bot requires Unix/Linux shell access with PHP support and SSL support in PHP for use against secure IRC servers.
GNU General Public License v3.0
40 stars 6 forks source link

TODO: Make upgrade-plugin update config.php with new settings #2

Closed Ueland closed 9 years ago

Ueland commented 12 years ago

When doing bot upgrade via the upgrade plugin, new configuration settings are not added to existing config.php from config.dist.php, which it should do to make upgrades even more easier in the feature.

hashworks commented 9 years ago

I suggest the following:

VikingBot.php:

require("config.dist.php");
require("config.php");
[...]

config.php / config.dist.php:

$config['server'] = 'servername';
[...]

This way new variables will be declared and existing ones will be overriden by config.php. Also: No need for unchanged config in config.php. Your idea WILL create problems IMHO.