From: Daniel Karbach Date: Fri, 15 Mar 2024 10:27:47 +0000 (+0100) Subject: fix twitch bot chat command permissions X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=e5192dadab765ecf0cdb877e0497293e0c9f1e45;hp=73c29bf37f10df401d87d14cc26999f88ce77379;p=alttp.git fix twitch bot chat command permissions --- diff --git a/app/TwitchBot/IRCMessage.php b/app/TwitchBot/IRCMessage.php index 4fb54c6..89aa023 100644 --- a/app/TwitchBot/IRCMessage.php +++ b/app/TwitchBot/IRCMessage.php @@ -200,7 +200,7 @@ class IRCMessage { } public function isMod() { - return $this->isOwner() || (isset($this->tags['mod']) && $this->tags['mod'] = '1'); + return $this->isOwner() || (isset($this->tags['mod']) && $this->tags['mod'] == '1'); } public function makePong() { diff --git a/app/TwitchBot/TwitchAppBot.php b/app/TwitchBot/TwitchAppBot.php index 04d03e6..13499f5 100644 --- a/app/TwitchBot/TwitchAppBot.php +++ b/app/TwitchBot/TwitchAppBot.php @@ -24,7 +24,7 @@ class TwitchAppBot extends TwitchBot { if ($text[0] == '!') { $this->handleChatCommand($channel, $msg); } else if ( - $channel->hasActiveGuessing() && + $channel->isAcceptingGuesses() && !empty($msg->tags['user-id']) && !empty($msg->tags['display-name'] && $channel->isValidGuess($text))