+ private function tagChannelSpecialSent(Channel $channel, $classification) {
+ $this->getNotes($channel);
+ $this->notes[$channel->id]['last_special'][$classification] = time();
+ }
+
+ private function getTimeSinceSpecial(Channel $channel, $classification) {
+ $notes = $this->getNotes($channel);
+ if (isset($notes['last_special'][$classification])) {
+ return time() - $notes['last_special'][$classification];
+ }
+ return 999999;
+ }
+
+ private function isDirectedAtMe($raw_text) {
+ $text = strtolower($raw_text);
+ if (strpos($text, 'horsti') !== false) {
+ return true;
+ }
+ return false;
+ }
+
+ private function shouldRespond(Channel $channel) {
+ $setting = $channel->getChatSetting('respond', 'yes');
+ if ($setting == 'yes') {
+ return true;
+ }
+ if ($setting == '50') {
+ return random_int(0, 1);
+ }
+ return false;
+ }
+