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:
@@ -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)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user