aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2020-06-09 08:33:19 +0200
committerPatrick Spek <p.spek@tyil.nl>2020-06-09 08:33:19 +0200
commit14c196d2fcbeb9048f51088f6dca1d07ec6d12ed (patch)
tree954c9cf26c95738705079624fb0233a109ffb675
parent1f3ac4c726a78b406ec3fff326799ed1018cd370 (diff)
downloadmusashi-14c196d2fcbeb9048f51088f6dca1d07ec6d12ed.tar.gz
musashi-14c196d2fcbeb9048f51088f6dca1d07ec6d12ed.tar.bz2
Embolden replaced text
-rw-r--r--META6.json3
-rw-r--r--lib/Local/Musashi.pm65
2 files changed, 5 insertions, 3 deletions
diff --git a/META6.json b/META6.json
index 19e0692..d177a02 100644
--- a/META6.json
+++ b/META6.json
@@ -11,7 +11,8 @@
"IRC::Client::Plugin::NickServ:ver<0.3.0+>:api<0>",
"IRC::Client::Plugin::DiceRolls:ver<0.2.0>",
"Log:auth<cpan:TYIL>",
- "IO::Glob"
+ "IO::Glob",
+ "IRC::TextColor"
],
"description": "Raku based IRC bot for Scriptkitties",
"license": "AGPL-3.0",
diff --git a/lib/Local/Musashi.pm6 b/lib/Local/Musashi.pm6
index 94a37ab..568b24e 100644
--- a/lib/Local/Musashi.pm6
+++ b/lib/Local/Musashi.pm6
@@ -8,6 +8,7 @@ use IO::Path::XDG;
use IRC::Client;
use IRC::Client::Plugin::DiceRolls;
use IRC::Client::Plugin::NickServ;
+use IRC::TextColor;
use Log;
use Log::Level;
@@ -97,12 +98,12 @@ unit sub MAIN (
multi method irc-privmsg-channel($e where /black/)
{
- $e.text.subst("black", "african-american")
+ $e.text.subst('black', ircstyle('african-american', :bold), :g)
}
multi method irc-privmsg-channel($e where *.contains('twitter.com'))
{
- $e.text.subst('twitter.com', 'nitter.net', :g)
+ $e.text.subst('twitter.com', ircstyle('nitter.net', :bold), :g)
}
#| Allow reloading configuration while the bot is