Add !grabquote [user] to quote a user's last line

This commit is contained in:
megaproxy 2026-06-04 17:36:03 +01:00
parent 52e579e364
commit 0a4edfe245
3 changed files with 40 additions and 3 deletions

View file

@ -28,6 +28,7 @@ python3 bot.py
| `!quote` | Random quote |
| `!quote <id>` | Quote by number |
| `!addquote <text>` | Store a new quote, returns its id |
| `!grabquote [user]`| Grab the last line a user said (`!grab` alias); no user = last speaker |
| `!delquote <id>` | Delete a quote |
| `!search <term>` | First quote containing a substring |
| `!quotecount` | How many quotes are stored |
@ -36,6 +37,9 @@ python3 bot.py
## Notes
- Quotes live in `quotes.db` (SQLite, created on first run, gitignored).
- `!grabquote` reads an in-memory buffer of each user's last channel line;
that buffer is per-session and resets on reconnect. Grabbed lines are stored
as `<nick> message`. Bot commands are never recorded, so you can't grab one.
- The bot auto-reconnects with exponential backoff and answers `PING`.
- If the nick is taken it appends `_` and retries.
- A NickServ password, if set via `IRC_NICKSERV_PASS`, is sent on connect —