From 61f60bbe4959abc68b3f00b44bb26112517cede9 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Fri, 6 Apr 2012 07:10:29 +0000 Subject: [PATCH] removing global attributes from userattr git-svn-id: https://svn.fhem.de/fhem/trunk@1416 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/fhem.pl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fhem/fhem.pl b/fhem/fhem.pl index 9eb5c1e7b..7909a3420 100755 --- a/fhem/fhem.pl +++ b/fhem/fhem.pl @@ -158,7 +158,7 @@ use vars qw(%addNotifyCB); # Used by event enhancers (e.g. avarage) use vars qw($reread_active); -my $AttrList = "room comment alias"; +my $AttrList = "room comment alias eventMap"; my $server; # Server socket my %comments; # Comments from the include files @@ -195,7 +195,6 @@ $modules{Global}{AttrList} = "verbose:1,2,3,4,5 mseclog version nofork logdir holiday2we " . "autoload_undefined_devices dupTimeout latitude longitude backupdir"; $modules{Global}{AttrFn} = "GlobalAttr"; -my $commonAttr = "eventMap"; @@ -1615,7 +1614,6 @@ getAllAttr($) if($modules{$defs{$d}{TYPE}}{AttrList}); $list .= " " . $attr{global}{userattr} if($attr{global}{userattr}); - $list .= " " . $commonAttr; return $list; } @@ -2582,9 +2580,9 @@ addToAttrList($) my @al = split(" ", $ua); my %hash; foreach my $a (@al) { - $hash{$a} = 1; + $hash{$a} = 1 if(" $AttrList " !~ m/ $a /); # Cleanse old ones } - $hash{$arg} = 1; + $hash{$arg} = 1 if(" $AttrList " !~ m/ $arg /); $attr{global}{userattr} = join(" ", sort keys %hash); }