aboutsummaryrefslogtreecommitdiffstats
path: root/docs/herald.md
blob: d651d4f716c3e002786426fc790610945e7ff51d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# herald

Owner-follow bot with a configurable keyword responder.

Herald tracks the owner's IRC presence and mirrors their channel movements.
It can also respond to keywords in channel messages with random replies.

## Dependencies

No external libraries required.

## Plugins

| File | Role |
|------|------|
| `commands.py` | Follow logic and admin commands |
| `respond.py` | Keyword-based auto-responder |

## Commands (owner only)

| Command | Description |
|---------|-------------|
| `!pause` | Pause keyword responses |
| `!resume` | Resume keyword responses |
| `!follow on` | Start tracking owner's channels (checks every 30s via WHOIS) |
| `!follow off` | Stop tracking |
| `!unfollow` | Immediately leave all follow-joined channels |
| `!join #channel` | Join a channel manually |
| `!part [#channel]` | Leave a channel |
| `!chans` | List channels |
| `!help` | Show usage (PM) |

## Automatic behaviour

- When the owner PARTs a channel, herald leaves too (unless it's a preconfigured channel).
- When the owner QUITs, herald leaves all non-preconfigured channels.
- With `!follow on`, herald also joins any channel the owner is in that herald isn't.

Preconfigured channels are the ones listed under `channels` in the config.

## Keyword responder (`respond.py`)

Configure in `[respond]`:

```ini
[respond]
keywords =
    hello
    hi there
responses =
    Hey!
    What's up?
```

When any `keyword` appears (case-insensitive) in a channel message, herald
replies with a randomly chosen response.

## Config keys

| Key | Description |
|-----|-------------|
| `[respond] keywords` | Newline-separated list of trigger words |
| `[respond] responses` | Newline-separated list of possible replies |