X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=videosite.pl;h=7803fa382f18a77e267cec0eab804696f116cbf4;hb=7d7ff7b6405f55adf3e083808da57b6bc6a31312;hp=2e361b0338c15cedde4539901f0a830a72e1b648;hpb=83574141e38675f983f264215e7a40c2752dc666;p=videosite.git diff --git a/videosite.pl b/videosite.pl index 2e361b0..7803fa3 100644 --- a/videosite.pl +++ b/videosite.pl @@ -79,7 +79,7 @@ sub check_for_link { } # Look if we should ignore this line - if ($message =~ m|/nosave|) { + if ($message =~ m,(?:\s|^)/nosave(?:\s|$),) { return; } @@ -97,7 +97,7 @@ sub check_for_link { sub cmd_save { open(CONF, '>'.$conffile); - print CONF XML::Simple::XMLout($conf, KeepRoot => 1, KeyAttr => ['module', 'key']); + print CONF XML::Simple::XMLout($conf, KeepRoot => 1, KeyAttr => {'config' => 'module', 'option' => 'key'}); close(CONF); } @@ -231,7 +231,7 @@ sub init_videosite { my $p; - unless(-r $conffile && defined($conf = XML::Simple::XMLin($conffile, ForceArray => ['config', 'option'], KeepRoot => 1, KeyAttr => ['module', 'key']))) { + unless(-r $conffile && defined($conf = XML::Simple::XMLin($conffile, ForceArray => ['config', 'option'], KeepRoot => 1, KeyAttr => {'config' => 'module', 'option' => 'key'}))) { # No config, start with an empty one write_debug(undef, 'No config found, using defaults'); $conf = { 'videosite' => { 'getter' => '' }};