summaryrefslogtreecommitdiff
path: root/boha.raku
blob: 725f00abfc30e05f884285f3425c423361d8582c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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!" }
        },
    ),
);