Commit graph

15 commits

Author SHA1 Message Date
f290554325
karma: log bump events; rebuild web page with podium, sparklines, activity feed and givers
All checks were successful
ci / check (push) Successful in 44s
2026-07-29 23:45:29 +00:00
9a3393153a
karma-web: static HTML karma board served at karma.devtronic.pro
All checks were successful
ci / check (push) Successful in 43s
2026-07-29 23:27:39 +00:00
e801b04d6e
karma: reasons, milestones, no-highlight replies
All checks were successful
ci / check (push) Successful in 47s
2026-07-29 22:29:01 +00:00
af9d5eed25
karma: leaderboard + rank, drop code-noise targets, atomic store writes
All checks were successful
ci / check (push) Successful in 48s
2026-07-29 20:44:26 +00:00
21e36b9961
Add karma module + on_message hook
All checks were successful
ci / check (push) Successful in 46s
2026-07-29 20:30:04 +00:00
12961f66da
Update README
All checks were successful
ci / check (push) Successful in 45s
2026-07-29 20:05:38 +00:00
90bfdb08f5
remove roadmap
All checks were successful
ci / check (push) Successful in 46s
2026-07-29 20:03:23 +00:00
c3139b4e4d
Add web modules (crypto, wiki, define, urban, tinyurl, down) + shared http/json
All checks were successful
ci / check (push) Successful in 48s
2026-07-29 19:42:36 +00:00
1c320ad0c3 Port skybot hash plugin as a module 2026-07-29 18:29:56 +00:00
ebb3333e78 Add weather module 2026-07-29 17:32:33 +00:00
a5e58493d8 Add a module (plugin) system for bot features
Introduce a `Module` trait (src/bot/module.rs): a feature declares the
commands it provides and turns each invocation into a `Vec<Action>`, without
touching the connection. Modules are pure — context in, actions out — so they
are unit-testable in isolation and avoid borrowing the `Bot` that owns them.

Bot::new builds the module set and a command -> module route table; the
`commands` dispatcher routes to the owning module and executes its actions,
and `help` is auto-generated from every module's CommandSpec metadata.

The existing ping/echo/hello move into a `builtins` module, and a stateful
`dice` module (`roll [NdM]`, with its own dependency-free xorshift PRNG) is
added as a worked example. Each network gets its own module set, so stateful
modules keep independent per-network state with no locking. Adding a feature
is now a new file in bot/modules/ plus one line in modules::all().

Tests: new tests/modules.rs drives modules through the trait with no network;
end-to-end dispatch and auto-help verified against a fake server. No new deps.
2026-07-29 16:13:24 +00:00
a15fb4f9a9 Restructure into a library crate with modular bot and irc
Split the single-binary crate into a reusable `rustbot` library (src/lib.rs)
plus a thin supervisor binary. The monolithic irc.rs and bot.rs become module
folders:

  irc/    message (wire parsing), connection (TCP/TLS transport), encoding
  bot/    mod (state + event loop), caps (IRCv3 cap negotiation + SASL),
          commands (message routing + command table)
  config  Config + layered loading, moved out of main.rs and bot.rs

main.rs is now just the per-network connect/reconnect supervisor over the
library API. Unit tests move out of the source files into tests/ integration
tests (config.rs, protocol.rs) that drive the public surface — prefix parsing
is now covered through Message::parse, and config layering through the new
public config::parse_str. Behavior is unchanged; no new dependencies.
2026-07-29 15:38:55 +00:00
b9e95430f5 Add multi-network support
Connect to several IRC networks at once. The config file gains optional
`[network]` section headers: keys before the first header are shared
defaults, and each section defines one network that inherits and overrides
them. A file with no sections is a single network exactly as before, so
existing configs are unaffected.

main spawns one supervisor thread per network, each with its own
connect/reconnect/backoff loop, so a failure on one network never disturbs
the others. The blocking Bot/Connection are reused unchanged — no async
runtime, no new dependencies. With more than one network, wire logs are
tagged with the section name; a lone network stays unprefixed.
2026-07-28 16:12:57 +00:00
ab02a5436e Add TLS transport support
Connect over TLS (default port 6697) using native-tls with the system
OpenSSL trust store for certificate verification. Unify the plaintext and
TLS transports behind a single Box<dyn Read + Write>, dropping the
read/write socket clone that a TLS session cannot support. Add a `tls`
config key and IRC_TLS override; the port auto-defaults to 6697 when TLS
is enabled.
2026-07-28 14:57:44 +00:00
05c004d32d
rust bot 2026-07-28 14:29:34 +00:00