From 3e1a5c2a07ee87dfdd2619161b58db7812b2ad45 Mon Sep 17 00:00:00 2001 From: jake Date: Sat, 31 Aug 2024 21:14:27 -0400 Subject: [PATCH] ACTION from IRC turns into /me for owncast --- .gitignore | 1 + myapp.pl | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 0136bdb..d0dc3e5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ start.bash start.sh +admin.txt diff --git a/myapp.pl b/myapp.pl index f5ad865..506d6c1 100755 --- a/myapp.pl +++ b/myapp.pl @@ -80,6 +80,8 @@ $irc->on(irc_privmsg => sub ($self, $message) { if ($message->{params}[0] eq $ENV{ IRC_CHANNEL }) { my @name = split '!', $message->{prefix}; #say $name[0] . " said: " . $message->{params}[1]; + # ACTION in owncast chat is ugly + $message->{params}[1] =~ s|^\x01ACTION|/me|; # ty for the \x01 hint, Irish send_chat_to_owncast($message->{params}[1], $name[0]); } });