$positions = explode(',', $set[1]);
foreach ($positions as $position) {
$coords = explode('-', $position);
- for ($i = intval($coords[0]); $i <= intval($coords[1]); ++$i) {
- $text[$i] = ' ';
- }
+ $text = mb_substr($text, 0, $coords[0]).str_repeat(' ', $coords[1] - $coords[0] + 1).mb_substr($text, $coords[1] + 1);
}
}
}
public static function isKnownBot($nick) {
return in_array(strtolower($nick), [
+ 'a_n_i_v',
'birrellthesquirrel',
'funtoon',
'nidbot2000',
'nightbot',
'pokemoncommunitygame',
+ 'sery_bot',
'speedgaming',
'starbase47',
'streamelements',
protected function evaluateChannel() {
if (empty($this->params)) {
- $this->channel()->associate(null);
return;
}
$cname = $this->params[0];
$cname = '#'.$cname;
}
$channel = Channel::firstWhere('twitch_chat', '=', $cname);
- $this->channel()->associate($channel);
+ if (!is_null($channel)) {
+ $this->channel()->associate($channel);
+ if (empty($this->twitch_category) && now()->sub(15, 'minute')->isBefore($this->created_at)) {
+ $this->twitch_category = $channel->twitch_category;
+ }
+ }
}
protected function detectLanguage() {