- }
- return $pogs > 2;
- }
-
- private function checkForSalute(Channel $channel) {
- $notes = $this->getNotes($channel);
- $o7s = 0;
- foreach ($notes['latest_msgs'] as $text) {
- if (ChatLog::classify($text) == 'o7') {
- ++$o7s;
- }
- }
- return $o7s > 2;
- }
-
- private function contextualMsg(Channel $channel) {
- $last = $this->getNote($channel, 'last_special');
- if ($last != 'gg' && $this->checkForGG($channel)) {
- $this->setNote($channel, 'last_special', 'gg');
- return $channel->randomOfClass('gg');
- }
- if ($last != 'number' && $this->checkForNumbers($channel)) {
- $this->setNote($channel, 'last_special', 'number');
- return $this->randomContextualNumber($channel);
- }
- if ($last != 'lol' && $this->checkForLaughter($channel)) {
- $this->setNote($channel, 'last_special', 'lol');
- return $this->randomLaughter($channel);
- }
- if ($last != 'glhf' && $this->checkForGLHF($channel)) {
- $this->setNote($channel, 'last_special', 'glhf');
- return $channel->randomOfClass('gl');
- }
- if ($last != 'hi' && $this->checkForGreeting($channel)) {
- $this->setNote($channel, 'last_special', 'hi');
- return $channel->randomOfClass('hi');
- }
- if ($last != 'hype' && $this->checkForHype($channel)) {
- $this->setNote($channel, 'last_special', 'hype');
- return $channel->randomOfClass('hype');
- }
- if ($last != 'pog' && $this->checkForPog($channel)) {
- $this->setNote($channel, 'last_special', 'pog');
- return $channel->randomOfClass('pog');
- }
- if ($last != 'o7' && $this->checkForSalute($channel)) {
- $this->setNote($channel, 'last_special', 'o7');
- return $channel->randomOfClass('o7');