Mediabot v3 continues its 3.4 development cycle with a final polish round on the external script bridge.
This pass is about one thing: making the plugin system easier to understand, easier to extend, and safer to maintain.
The bridge has been advertised as multi-language for a while: Perl, Python and Tcl scripts can all speak the same mediabot-script-v1 protocol.
The latest examples make that much clearer.
Two new reference scripts complete the current feature matrix:
plugins/scripts/examples/countdown.py
plugins/scripts/examples/partwatch.tcl
countdown.py is the Python reference for timer actions and per-route configuration.
partwatch.tcl is the Tcl reference for channel-event routing, specifically the part event.
In other words: Perl no longer gets to keep all the advanced examples for itself. The Triwizard Tournament finally has more than one school on the field. π
The new Python example is routed as:
pcountdown
A user can run something like:
pcountdown 60 pizza
The script announces the countdown immediately, then responds later when the timer fires.
It demonstrates the same lifecycle as the Perl reminder example:
command β reply β timer action β timer event β final reply
It also shows how a route can receive its own configuration:
CONFIG_pcountdown=max_seconds=600
That configuration can tighten the allowed countdown range without changing the script itself.
The new Tcl example is routed through the event system:
EVENTS=part=examples/partwatch.tcl
When someone leaves a channel, the script can say goodbye in the same channel and include the part reason when one exists.
It also follows the safety pattern established by the earlier event examples: if it is accidentally routed to the wrong event, it logs a warning and stays silent on IRC.
A reference script should teach good habits, not spam the Great Hall because of a config typo. π¦
The partyline .scriptdryrun config reference now documents the newer keys introduced during the plugin arc:
EVENTS
EVENT_COOLDOWN
CONFIG_<route>
That matters because operational features are only useful when the operator can discover them without digging through the source.
The pass also adds a test contract so future plugin keys cannot be silently added without appearing in the partyline reference.
The documentation now states an important limitation clearly:
CONFIG_<route> applies to explicit ROUTES and EVENTS entries.
A command served only through the fallback SCRIPT setting has no route name, so there is no route-specific config to attach. The fix is simple: give the command an explicit route.
That is not a code bug; it is a boundary that needed to be written down.
This round also includes a plugin-arc handoff document for the next maintainer.
It maps the work from channel-scope guards and timers through event routing, route config, partyline visibility and multi-language examples. It also lists the active test contracts and the traps already paid for during the work.
That kind of document is not glamorous, but it prevents future regressions. Dumbledore would call it boring only if he wanted someone else to read it first. π
The pass was validated with the full Mediabot test suite:
10452/10452 tests passed
The handoff notes also mention that the count can vary slightly depending on available interpreters such as python3 and tclsh.
No database schema change.
No live configuration required.
No secret handling change.
This round makes the plugin bridge feel more complete:
Mediabotβs script bridge now looks less like a hidden spellbook and more like a proper classroom: examples in several languages, clear safety rules, and enough tests to stop the staircases from moving under your feet. πͺ
You must be logged in to reply.