IRC bot written in Zig.
Find a file
Jacob Jonsson 4f2b9cbce2
test(bot): record recursive substitution test case
Found while the IRC users tried to find bugs in the code base.

Currently the bot does not "hear" the commands of users, which means
that of the following conversation:

```
<jassob> helo, world!
<jassob> s/helo/hello/
```

the only heard messages in the backlog would be the first ("helo,
world!"), the substitution would be parsed and executed, but not added
to the backlog and hence not possible to update.
2026-03-15 12:40:08 +01:00
src test(bot): record recursive substitution test case 2026-03-15 12:40:08 +01:00
build.zig refactor: extract modules from bot.zig 2026-03-11 00:01:05 +01:00
build.zig.zon wip 2025-11-28 23:04:53 +01:00
flake.lock chore: implement initial bot with substitute command 2025-11-02 14:03:12 +01:00
flake.nix wip 2025-11-28 23:04:53 +01:00
README.md docs: update README.md 2026-03-11 00:09:28 +01:00

zigeru

zigeru is a IRC bot which implements the following commands:

  • s/OLD/NEW/ -- posts the previous message by the user, where every occurrence of OLD is replaced by NEW.
00:04 <jassob> hello, world
00:05 <jassob> s/world/IRC/
00:05 <@eru> jassob: "hello, IRC"
  • !help -- post a usage string as a response.
00:05 <jassob> !help
00:05 <@eru> Send `s/TYPO/CORRECTION/` to replace TYPO with CORRECTION in your last message.
  • !join #CHANNEL -- make zigeru join #CHANNEL.
# in #eru-test2
00:06 <jassob> !join #eru-test3

# in #eru-test3
00:06 --> jassob (~u@6wh6sdzhnfjx4.dtek.se) has joined #eru-test3
00:06 -- Channel #eru-test3: 2 nicks (0 owners, 0 admins, 1 op, 0 halfops, 0 voiced, 1 regular)
00:06 -- Channel created on ons, 11 mar 2026 00:06:44

Getting started

To enter into a development shell with all the tools needed for interacting with this project, run the following command:

$ nix develop

To run the tests: zig build test.

To run the binary: zig build run.

To build the binary: zig build.

To build the binary statically: zig build -Dtarget=x86_64-linux-musl