mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 03:06:37 +00:00
fhem.pl: return error message for defmod type change (Forum #66313)
git-svn-id: https://svn.fhem.de/fhem/trunk@13325 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
3f4b072726
commit
7e435f646d
@ -1894,6 +1894,8 @@ CommandDefMod($$)
|
|||||||
if(int(@a) < 2);
|
if(int(@a) < 2);
|
||||||
if($defs{$a[0]}) {
|
if($defs{$a[0]}) {
|
||||||
$def = $a[2] ? "$a[0] $a[2]" : $a[0];
|
$def = $a[2] ? "$a[0] $a[2]" : $a[0];
|
||||||
|
return "defmod $a[0]: Cannot change the TYPE of an existing definition"
|
||||||
|
if($a[1] ne $defs{$a[0]}{TYPE});
|
||||||
return CommandModify($cl, $def);
|
return CommandModify($cl, $def);
|
||||||
} else {
|
} else {
|
||||||
return CommandDefine($cl, $def);
|
return CommandDefine($cl, $def);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user