From 45c117ab00d282f97df19cd7f58126d956f044ba Mon Sep 17 00:00:00 2001 From: dakkar Date: Mon, 31 May 2021 14:49:31 +0100 Subject: first stab --- boha.raku | 21 +++++++++++++++++++++ boha.toml | 10 ++++++++++ 2 files changed, 31 insertions(+) create mode 100644 boha.raku create mode 100644 boha.toml 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 // $?FILE.IO.sibling('boha.toml').Str) +); + +.run with IRC::Client.new( + |($config), + channels => $config.map(*.), + :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!" } + }, + ), +); diff --git a/boha.toml b/boha.toml new file mode 100644 index 0000000..a15c0c6 --- /dev/null +++ b/boha.toml @@ -0,0 +1,10 @@ +[server] +host = 'irc.libera.chat' +port = 6697 +nick = 'raku-boha' +username = 'Boha' +userreal = 'Boha (in Raku)' +ssl = true + +[[channels]] +name = '#perl.it' -- cgit v1.2.3