videosite-irssi: remove debug messages
[videosite.git] / videosite-irssi.pl
index f20e3a1..1a09e66 100644 (file)
@@ -778,9 +778,13 @@ sub config_init {
     my $conf;
 
     # Check for irssi internal config. If not found...
+    if (config_has(['config-version'])) {
+        # Configuration in irssi config file. We're done.
+        return;
+    }
 
+    # Try to find old config files and load them.
     if (-r $conffile) {
-        write_debug("Attempting JSON config load from %s", $conffile);
         eval {
             local $/;
             open(CONF, '<', $conffile);
@@ -788,7 +792,6 @@ sub config_init {
             close(CONF);
         };
     } elsif (-r $xmlconffile) {
-        write_debug("Attempting XML config load from %s", $xmlconffile);
         $conf = XML::Simple::XMLin($xmlconffile, ForceArray => ['config', 'option', 'connectorlist'], KeepRoot => 1, KeyAttr => {'connector' => '+name', 'config' => 'module', 'option' => 'key'});
     }
 
@@ -855,6 +858,7 @@ sub config_init {
     }
     config_set(['active-connectors'], join(",", @{$conf->{connectorlist}}));
     config_set(['defined-connectors'], join(",", @connectors));
+    config_set(['config-version'], '2');
 }
 
 #