diff options
| author | Ahmed <git@gumx.cc> | 2026-06-20 00:08:40 +0300 |
|---|---|---|
| committer | Ahmed <git@gumx.cc> | 2026-06-20 00:08:40 +0300 |
| commit | 815b742006732b1ccdb665ba5c076fbb7b1e79c6 (patch) | |
| tree | 24db2809ae8c3290211ef2876c9c8e509f72b2e5 | |
| parent | d60f3ce4d1996f207e2c693ae1102e6a5ddad701 (diff) | |
fix: bunch of vibed edits to fix vibed edits
| -rw-r--r-- | alfred/vpn.py | 4 | ||||
| -rw-r--r-- | dev-docs/alfred.md | 8 | ||||
| -rw-r--r-- | dev-docs/daffy.md | 2 | ||||
| -rw-r--r-- | dev-docs/jeeves.md | 10 | ||||
| -rw-r--r-- | dev-docs/osterman.md | 8 | ||||
| -rw-r--r-- | jeeves/admin.py | 2 | ||||
| -rw-r--r-- | jeeves/art.py | 2 | ||||
| -rw-r--r-- | jeeves/config.py | 6 | ||||
| -rw-r--r-- | jeeves/dj.py | 2 | ||||
| -rw-r--r-- | jeeves/duck.py | 4 | ||||
| -rw-r--r-- | shireen/commands.py | 2 |
11 files changed, 25 insertions, 25 deletions
diff --git a/alfred/vpn.py b/alfred/vpn.py index 230aae1..6209a96 100644 --- a/alfred/vpn.py +++ b/alfred/vpn.py @@ -141,9 +141,9 @@ def cmd_vpn(bot, trigger): ) try: url = _upload(cfg) - bot.say(f"{name}: {ip} — {url}") + bot.say(f"{name}: {ip}, {url}") except Exception: - bot.say(f"{name}: {ip} — upload failed. server pubkey: {pub}") + bot.say(f"{name}: {ip} upload failed. server pubkey: {pub}") elif action == "remove": if len(args) < 2: diff --git a/dev-docs/alfred.md b/dev-docs/alfred.md index 49e2a08..07708b1 100644 --- a/dev-docs/alfred.md +++ b/dev-docs/alfred.md @@ -17,7 +17,7 @@ it manages are also Sopel instances, each with their own configs. Alfred's directory contains multiple .py files, each loaded as an independent Sopel plugin module. Sopel loads them individually (not as a package), so relative imports do not work. Modules that need shared data use a sys.path -insertion to import `helpstrings` as a plain module — see the Help system +insertion to import `helpstrings` as a plain module; see the Help system section below. ``` @@ -69,14 +69,14 @@ args) and `help.py` uses the same strings for `!help srv` responses. !help <topic> <cmd> → single command description + usage ``` -All responses are sent via `bot.notice()` to the requester — not said publicly +All responses are sent via `bot.notice()` to the requester, not said publicly in channel. This matches the osterman and jeeves help behaviour. ### Dispatch `help.py` delegates all resolution to `h.lookup(args)` in `helpstrings.py`. `helpstrings.py` exposes `TOPIC_MAP`, `_ALL`, and `lookup()` alongside the -existing string constants — the same pattern used by osterman and jeeves. +existing string constants; the same pattern used by osterman and jeeves. Unknown args fall back to the TOPICS line with a "no help for X" prefix. ### Bare-call consistency @@ -89,7 +89,7 @@ USAGE lists that previously existed in each plugin have been removed. `!help bot <name>` where `<name>` is not `list` or `all` falls back to `h.BOT_NAME`, the generic bot-name description. This is handled inside -`h.lookup()` — not in `help.py` — since managed bot names are dynamic and +`h.lookup()`, not in `help.py`, since managed bot names are dynamic and not enumerable at help-text definition time. ### coffee +n / -n lookup diff --git a/dev-docs/daffy.md b/dev-docs/daffy.md index 5ac7815..96e0539 100644 --- a/dev-docs/daffy.md +++ b/dev-docs/daffy.md @@ -112,7 +112,7 @@ increments but is never compared to a threshold. `!hunt idle N` checks the current `empty_rounds` immediately on set. If the counter already meets the new threshold and no duck is active, the hunt stops -right away with an announcement — same behaviour as if the flee had just +right away with an announcement, same behaviour as if the flee had just triggered it. This prevents a silent bypass where setting a lower threshold while `empty_rounds` was already at or above it would have no effect until the next flee, and a single kill in between would reset the counter and escape diff --git a/dev-docs/jeeves.md b/dev-docs/jeeves.md index 27ba163..594793c 100644 --- a/dev-docs/jeeves.md +++ b/dev-docs/jeeves.md @@ -175,12 +175,12 @@ trick above. ## DJ notes -- Track duration: read fresh on each play via `jv.cfg_val(bot, "dj_track_duration")` — - changing `dj_track_duration` affects tracks queued after the change, not any +- Track duration: read fresh on each play via `jv.cfg_val(bot, "dj_track_duration")`. + Changing `dj_track_duration` affects tracks queued after the change, not any currently running timer. - `!loop` (no args): shows state to anyone, no privilege check. - `!loop on|off`: requires op (checked manually via `jv.is_authorized`). -- Queue display: no leading indentation — `{i}. {url}` format. +- Queue display: no leading indentation. `{i}. {url}` format. --- @@ -210,7 +210,7 @@ trick above. ## Quotes notes -- Quotes are stored globally in `jv_db["quotes"]` — shared across all channels. +- Quotes are stored globally in `jv_db["quotes"]`, shared across all channels. - Per-channel auto-post state is in `jv.chan_db(bot, channel)["quotes"]`. - `!quote del N` uses 1-based indexing for user-facing display. @@ -231,7 +231,7 @@ preventing the 2× vertical stretch that would otherwise occur. ## Known issues and tradeoffs **DJ timer not persisted.** If the bot restarts mid-track the timer is lost. -The queue survives (it's in memory only while the bot runs anyway — not stored +The queue survives (it's in memory only while the bot runs anyway, not stored to disk). Reissue `!play` after restart. **Duck hunt off by default.** Unlike daffy, jeeves does not auto-start the hunt diff --git a/dev-docs/osterman.md b/dev-docs/osterman.md index 75e058c..fca9ca0 100644 --- a/dev-docs/osterman.md +++ b/dev-docs/osterman.md @@ -71,7 +71,7 @@ bot.memory["os_last"] - {(channel, nick): timestamp} last message time `os_join_flood` is keyed by `(channel, host)` so join flood counts are isolated per channel. A user joining multiple channels quickly does not bleed the flood -counter across channels. `os_nick_flood` is network-wide by design — NICK changes +counter across channels. `os_nick_flood` is network-wide by design; NICK changes apply across all channels. The other modules access these keys with safe fallbacks in case of load order @@ -137,7 +137,7 @@ Event types: `join`, `part`, `quit`, `kick`, `ban`, `nick`, `mute`, `unmute`, | Greetings, idle warns, bad word warn | `bot.notice` | nick | `_notice(bot, nick, text)` in `commands.py` and `help.py` calls -`bot.notice(text, nick)` — a true IRC NOTICE, not a PRIVMSG. This is the +`bot.notice(text, nick)`: a true IRC NOTICE, not a PRIVMSG. This is the standard approach for automated bot feedback that should not trigger other bots or appear as a regular chat message. @@ -205,7 +205,7 @@ indices, then `del N`. This avoids ambiguity with regex special characters. ### !unban db cleanup `cmd_unban` removes matching entries from the internal ban database using -`fnmatch.fnmatch(b["mask"], mask)` — tests whether the stored ban mask matches +`fnmatch.fnmatch(b["mask"], mask)`: tests whether the stored ban mask matches the target being unbanned. The argument order matters: `fnmatch(pattern, string)` where the stored mask is the pattern and the unban target is the string being tested against it. @@ -222,7 +222,7 @@ Sent as IRC NOTICE to the joining user. Controlled by the `greet` config key. ### !seen scoping -In channel: checks only the current channel — live presence check against +In channel: checks only the current channel. Live presence check against `bot.channels[channel]`, then DB query with `AND channel = ?`. Reports in channel. In PM: owner/ACL only. Cross-channel lookup across all joined channels and diff --git a/jeeves/admin.py b/jeeves/admin.py index 8738025..d210701 100644 --- a/jeeves/admin.py +++ b/jeeves/admin.py @@ -98,7 +98,7 @@ def cmd_follow(bot, trigger): bot.notice("follow off", trigger.nick) else: state = "on" if bot.memory.get("jv_follow_enabled") else "off" - bot.notice(f"follow is {state} — usage: !follow <on|off>", trigger.nick) + bot.notice(f"follow is {state}. usage: !follow <on|off>", trigger.nick) @plugin.command("unfollow") diff --git a/jeeves/art.py b/jeeves/art.py index 274bac5..dbbb444 100644 --- a/jeeves/art.py +++ b/jeeves/art.py @@ -151,7 +151,7 @@ def _img_to_irc(url, height): @plugin.require_chanmsg def cmd_draw(bot, trigger): if not _PILLOW: - bot.notice("!draw requires Pillow (pip install Pillow) — not installed", trigger.nick) + bot.notice("!draw requires Pillow (pip install Pillow), not installed", trigger.nick) return args = (trigger.group(2) or "").split(None, 1) diff --git a/jeeves/config.py b/jeeves/config.py index 58d6484..0f2ea9d 100644 --- a/jeeves/config.py +++ b/jeeves/config.py @@ -29,19 +29,19 @@ def cmd_set(bot, trigger): if len(args) < 2: keys = ", ".join(sorted(jv.CONFIG_KEYS)) - bot.notice(f"usage: !set <key> <value> — keys: {keys}", trigger.nick) + bot.notice(f"usage: !set <key> <value>. keys: {keys}", trigger.nick) return key, raw = args[0].lower(), args[1] if key not in jv.CONFIG_KEYS: - bot.notice(f"unknown key '{key}' — use !config to see valid keys", trigger.nick) + bot.notice(f"unknown key '{key}'. use !config to see valid keys", trigger.nick) return typ, _, global_only, _ = jv.CONFIG_KEYS[key] if global_only and in_chan: - bot.notice(f"{key} is a global setting — use in PM to change it", trigger.nick) + bot.notice(f"{key} is a global setting. use in PM to change it", trigger.nick) return if global_only and not jv.is_owner(bot, trigger): diff --git a/jeeves/dj.py b/jeeves/dj.py index c270c64..d3b9982 100644 --- a/jeeves/dj.py +++ b/jeeves/dj.py @@ -258,7 +258,7 @@ def cmd_loop(bot, trigger): bot.say(f"loop {arg}", trigger.sender) else: state = "on" if bot.memory.get("dj_loop") else "off" - bot.say(f"loop is {state} — use !loop <on|off> to change (op)", trigger.sender) + bot.say(f"loop is {state}. use !loop <on|off> to change (op)", trigger.sender) @plugin.command("clear") diff --git a/jeeves/duck.py b/jeeves/duck.py index 03804d1..1809456 100644 --- a/jeeves/duck.py +++ b/jeeves/duck.py @@ -30,7 +30,7 @@ from sopel import plugin SPAWN_MSG = "\x02** A duck appears! **\x02 Quick, type !bang to shoot it!" FLEE_MSG = "\x02** The duck got away! **\x02 Too slow." -EMPTY_MSG = "*click* — chamber is empty. Use !reload first." +EMPTY_MSG = "*click* chamber is empty. Use !reload first." MOCK_MSG = "BLAM! ...at what? There's no duck, {nick}. You waste your shot." KILL_MSG = "\x02BLAM!\x02 {nick} shot the duck in \x02{elapsed:.2f}s\x02! (+1 pt)" @@ -123,7 +123,7 @@ def _tick(bot): st["enabled"] = False st["next_spawn"] = float("inf") bot.say( - f"Hunt over — no players for {idle} round(s). " + f"Hunt over, no players for {idle} round(s). " f"Type !hunt start to begin again.", channel, ) diff --git a/shireen/commands.py b/shireen/commands.py index d5ddbda..75ae3ce 100644 --- a/shireen/commands.py +++ b/shireen/commands.py @@ -469,7 +469,7 @@ def cmd_news(bot, trigger): def _broadcast_tick(bot): now = time.time() - # Snapshot config and decide which channels need a broadcast — release lock before HTTP + # Snapshot config and decide which channels need a broadcast; release lock before HTTP with bot.memory["sh_lock"]: data = bot.memory["sh_data"] feeds = list(data.get("feeds", [])) |
