git://git.camperquake.de
/
videosite.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a5c45c2
)
videosite-irssi: Add messages to configuration conversion
author
Ralf Ertzinger
<ralf@skytale.net>
Tue, 30 Apr 2013 17:23:27 +0000
(19:23 +0200)
committer
Ralf Ertzinger
<ralf@skytale.net>
Tue, 30 Apr 2013 17:23:27 +0000
(19:23 +0200)
videosite-irssi.pl
patch
|
blob
|
history
diff --git
a/videosite-irssi.pl
b/videosite-irssi.pl
index
3d72728
..
26ecfe5
100644
(file)
--- 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) {
# 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);
eval {
local $/;
open(CONF, '<', $conffile);
@@
-57,7
+58,11
@@
sub config_init {
close(CONF);
};
} elsif (-r $xmlconffile) {
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'});
$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;
}
#
}
#