From: Ralf Ertzinger Date: Tue, 30 Apr 2013 17:23:27 +0000 (+0200) Subject: videosite-irssi: Add messages to configuration conversion X-Git-Url: https://git.camperquake.de/gitweb.cgi?p=videosite.git;a=commitdiff_plain;h=ac08a598f6a09beeb1e1ea5f7508a338cf7d5c1c videosite-irssi: Add messages to configuration conversion --- diff --git a/videosite-irssi.pl b/videosite-irssi.pl index 3d72728..26ecfe5 100644 --- a/videosite-irssi.pl +++ b/videosite-irssi.pl @@ -50,6 +50,7 @@ sub config_init { # Try to find old config files and load them. if (-r $conffile) { + Irssi::print("Converting configuration from videosite.json. This will happen only once."); eval { local $/; open(CONF, '<', $conffile); @@ -57,7 +58,11 @@ sub config_init { close(CONF); }; } elsif (-r $xmlconffile) { + Irssi::print("Converting configuration from videosite.xml. This will happen only once."); $conf = XML::Simple::XMLin($xmlconffile, ForceArray => ['config', 'option', 'connectorlist'], KeepRoot => 1, KeyAttr => {'connector' => '+name', 'config' => 'module', 'option' => 'key'}); + } else { + # No old config files around. Just exit. + return; } #