Forum teuk.org

TeuK  Admin

Member since 2025-12-22 09:24:20Z · 8mo ago

Total posts: 274  ·  Total topics: 271


Topics (page 1/28)

← PrevPage 1 / 28Next →

Posts (page 26/28)

The Incident

Every time a user joined a channel, this appeared in the logs:

[DEBUG1] userOnJoin() SQL Error: Unknown column 'id_user_level' in 'SELECT'
         Query: SELECT id_channel, notice, id_user_level FROM CHANNEL WHERE name = ?

id_user_level has never existed in the…

Mediabot cleanup: command status fixes, schema alignment, and safer command handling

A new cleanup pass has just been completed on mediabot_v3, with a focus on reliability and consistency rather than new features.

What was fixed

This round of work mainly addressed command management …

“CONSTANT VIGILANCE!” — Mad-Eye Moody, probably staring at a DBI statement handle that was never closed.


The Problem Nobody Noticed (Until Now)

The previous audit session fixed the obvious statement handle leaks. This one went deeper — into the nested my $sth shadows, the early `…

1. DBD::MariaDB Migration

The database driver was migrated from the legacy DBD::mysql to DBD::MariaDB throughout the entire codebase.

All DSN strings were updated from DBI:mysql: to DBI:MariaDB:, with host forced to 127.0.0.1 (MariaDB refuses port-based connections when `localho…

A new cleanup and hardening pass just landed in mediabot_v3.

Commit:
⚡ Stupefy fuzzy matches: unified hostmask magic and taught Mediabot stricter SQL spells

This round was focused on reliability rather than flashy features.

What changed

  • unified hostmask matching logic in…

Just pushed a small cleanup commit on mediabot_v3:

🪄 Mischief managed: banished stray SELECT * queries and taught Mediabot cleaner SQL spells

This pass removes a bunch of leftover SELECT * queries and replaces them with explicit column lists where it made sense. The goal is simple: cl…

Overview

This session tackled one of the oldest forms of technical debt in the codebase: implicit SQL JOINs. Since Mediabot’s origins in 2007, many queries were written in the traditional comma-separated FROM A, B WHERE A.id = B.id style. Modern SQL has preferred explicit JOIN ... ON synta…

Overview

This session focused on a methodical bottom-up audit of all 32 Perl modules in the stack. No new features — just making the existing code more correct, more defensive, and less likely to silently misbehave under load or after a connection drop.

Three distinct categories of issues w…

Why This Matters

A codebase that’s been evolving since 2007 accumulates technical debt. Some of it is cosmetic. Some of it is a ticking clock. After a methodical audit of all 32 Perl modules, five categories of real issues surfaced — ranging from broken database calls to latent shell injection…

Mediabot v3 — Development Journal, March 2026


A Monster in the Making

Every long-lived project has one: a file that started small and quietly grew into something terrifying. For Mediabot v3, that file was Mediabot.pm — a 15,530-line monolith containing everything: IRC dispatc…

← PrevPage 26 / 28Next →