From 6f60d16df03e77c4245e7cb96563a1a8eeaa13f8 Mon Sep 17 00:00:00 2001 From: nasseeder1 Date: Mon, 23 Nov 2020 13:40:33 +0000 Subject: [PATCH] 50_SSChatBot: contrib 1.12.0 git-svn-id: https://svn.fhem.de/fhem/trunk@23219 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/DS_Starter/50_SSChatBot.pm | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/fhem/contrib/DS_Starter/50_SSChatBot.pm b/fhem/contrib/DS_Starter/50_SSChatBot.pm index 16b357861..ee08d81e1 100644 --- a/fhem/contrib/DS_Starter/50_SSChatBot.pm +++ b/fhem/contrib/DS_Starter/50_SSChatBot.pm @@ -91,7 +91,7 @@ BEGIN { CommandAttr CommandDefine CommandGet - CommandTrigger + CommandTrigger data defs devspec2array @@ -1210,12 +1210,14 @@ sub _parseUsers { } if(%users) { - $hash->{HELPER}{USERS} = \%users; - if(!$hash->{HELPER}{USERFETCHED}) { - my $event = "CHAT_INITIALIZED"; - CommandTrigger(undef, "$name $event"); - } - $hash->{HELPER}{USERFETCHED} = 1; + $hash->{HELPER}{USERS} = \%users; + my $olduf = $hash->{HELPER}{USERFETCHED}; + $hash->{HELPER}{USERFETCHED} = 1; + + if(!$olduf) { + my $event = "CHAT_INITIALIZED"; + CommandTrigger(undef, "$name $event"); + } } my @newa; @@ -1378,7 +1380,7 @@ sub formString { "+" => "%2B", }; - %$replacements = (%$replacements, %$enctourl); + %$replacements = (%$replacements, %$enctourl); } else { $replacements = {