mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
98_telnet.pm: avaluate the title if prompt is not set (Forum #54205)
git-svn-id: https://svn.fhem.de/fhem/trunk@11605 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
1f67e291e2
commit
846533e8fb
@ -194,7 +194,13 @@ telnet_Read($)
|
||||
return if(!$chash);
|
||||
$chash->{canAsyncOutput} = 1;
|
||||
$chash->{encoding} = AttrVal($name, "encoding", "utf8");
|
||||
$chash->{prompt} = AttrVal($name, "prompt", "fhem>");
|
||||
$chash->{prompt} = AttrVal($name, "prompt",
|
||||
AttrVal('global','title','fhem>'));
|
||||
if($chash->{prompt} =~ m/^{.*}$/s) {
|
||||
$chash->{prompt} = eval $chash->{prompt};
|
||||
$chash->{prompt} =~ s/\n//;
|
||||
$chash->{prompt} .= '>'; # Not really nice, but dont know better.
|
||||
}
|
||||
syswrite($chash->{CD}, sprintf("%c%c%c", 255, 253, 0) )
|
||||
if( AttrVal($name, "encoding", "") ); #DO BINARY
|
||||
$chash->{CD}->flush();
|
||||
|
Loading…
x
Reference in New Issue
Block a user