summaryrefslogtreecommitdiff
path: root/boha.raku
diff options
context:
space:
mode:
Diffstat (limited to 'boha.raku')
-rw-r--r--boha.raku21
1 files changed, 21 insertions, 0 deletions
diff --git a/boha.raku b/boha.raku
new file mode 100644
index 0000000..725f00a
--- /dev/null
+++ b/boha.raku
@@ -0,0 +1,21 @@
+#!/usr/bin/env rakudo
+use v6.d;
+use Config::TOML;
+use IRC::Client;
+
+my $config = from-toml(
+ file => (%*ENV<BOHA_CONFIG_FILE> // $?FILE.IO.sibling('boha.toml').Str)
+);
+
+.run with IRC::Client.new(
+ |($config<server>),
+ channels => $config<channels>.map(*.<name>),
+ :debug,
+ :plugins(
+ class :: does IRC::Client::Plugin {
+ # irc-addressed for in-channel messages
+ # irc-privmsg-me for direct messages
+ method irc-to-me($e) { "Boo!" }
+ },
+ ),
+);