deal with newlines from owncast
This commit is contained in:
parent
3356d6d181
commit
3176ab86a6
1 changed files with 3 additions and 2 deletions
5
myapp.pl
5
myapp.pl
|
@ -19,11 +19,11 @@ use Mojo::JSON qw(decode_json);
|
|||
use Mojo::UserAgent;
|
||||
use Mojo::IRC;
|
||||
use Carp qw(croak);
|
||||
#use Smart::Comments;
|
||||
use Smart::Comments;
|
||||
use MIME::Base64 qw(encode_base64);
|
||||
## no critic (prototype)
|
||||
|
||||
our $VERSION = '0.2'; # not 100% stress tested
|
||||
our $VERSION = '0.3'; # not 100% stress tested
|
||||
|
||||
my $streaming_RN = 0;
|
||||
my $stream_stop_time = 0;
|
||||
|
@ -308,6 +308,7 @@ sub chat ($c, $hook) {
|
|||
my $name = $hook->{eventData}->{user}->{displayName};
|
||||
my $color = $hook->{eventData}->{user}->{displayColor};
|
||||
my $body = $hook->{eventData}->{rawBody}; # no html
|
||||
$body =~ s|\s\n|/ |g;
|
||||
my $visible = $hook->{eventData}->{visible};
|
||||
if ($visible) {
|
||||
send_chat_to_irc( '<' . $colors{$color} . "$name" . NORMAL . '>' . " $body");
|
||||
|
|
Loading…
Reference in a new issue