From e5192dadab765ecf0cdb877e0497293e0c9f1e45 Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Fri, 15 Mar 2024 11:27:47 +0100 Subject: [PATCH] fix twitch bot chat command permissions --- app/TwitchBot/IRCMessage.php | 2 +- app/TwitchBot/TwitchAppBot.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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)) -- 2.39.2