fhem.pl: Allow Dispatch to match multi-line text (Forum #112399)

git-svn-id: https://svn.fhem.de/fhem/trunk@22261 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2020-06-25 08:16:24 +00:00
parent c483ea77a9
commit d5232c34cd

View File

@@ -3978,7 +3978,7 @@ Dispatch($$;$$)
foreach my $m (@{$clientArray}) { foreach my $m (@{$clientArray}) {
# Module is not loaded or the message is not for this module # Module is not loaded or the message is not for this module
next if(!$modules{$m} || $dmsg !~ m/$modules{$m}{Match}/i); next if(!$modules{$m} || $dmsg !~ m/$modules{$m}{Match}/is);
if( my $ffn = $modules{$m}{FingerprintFn} ) { if( my $ffn = $modules{$m}{FingerprintFn} ) {
($isdup, $idx) = CheckDuplicate($name, $dmsg, $ffn); ($isdup, $idx) = CheckDuplicate($name, $dmsg, $ffn);
@@ -4005,7 +4005,7 @@ Dispatch($$;$$)
$h = $module->{MatchList} if(!$h); $h = $module->{MatchList} if(!$h);
if(defined($h)) { if(defined($h)) {
foreach my $m (sort keys %{$h}) { foreach my $m (sort keys %{$h}) {
if($dmsg =~ m/$h->{$m}/) { if($dmsg =~ m/$h->{$m}/is) {
my ($order, $mname) = split(":", $m); my ($order, $mname) = split(":", $m);
if(AttrVal("global", "autoload_undefined_devices", 1)) { if(AttrVal("global", "autoload_undefined_devices", 1)) {