2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-15 16:19:11 +00:00

eventMap state bugfix (PlusPus & Plus)

git-svn-id: https://svn.fhem.de/fhem/trunk@1578 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2012-05-23 09:01:25 +00:00
parent d282361ab1
commit 203df9f54c

View File

@ -2618,18 +2618,18 @@ ReplaceEventMap($$$)
my $nstr = join(" ", @{$str}) if(!$dir);
my $changed;
foreach my $rv (split($sc, $em)) {
my ($re, $val) = split(":", $rv, 2);
my ($re, $val) = split(":", $rv, 2); # Real-Event-Regexp:GivenName
next if(!defined($val));
if($dir) { # event -> Presentation
if($dir) { # event -> GivenName
if($str =~ m/$re/) {
$str =~ s/$re/$val/;
$changed = 1;
last;
}
} else { # Setting event
if($nstr =~ m/$val/) {
$nstr =~ s/$val/$re/;
} else { # GivenName -> set command
if($nstr =~ m/\b$val\b/) {
$nstr =~ s/\b$val\b/$re/;
$changed = 1;
last;
}