Mediabot

IRC bot since 2007. Modernized, modular, still alive.

WHAT IS MEDIABOT?

Undernet (ircu) Libera Epiknet Perl since 2007

mediabot_v3 has been tested on Undernet ircu server, Libera and Epiknet (but it may support other networks). The bot joins a console channel where it will notice its actions.

  • Read the README file to know how to deploy it.
  • Read the Wiki Documentation to know how to register it at first use.
  • Refer to the bot log file to know what is going on.

Eggdrop

IRC bots, TCL scripts and more.

This section contains notes about Eggdrop and Windrop, including Tcl scripting, portable builds, HTTPS/TLS compatibility, performance tuning, and general bot maintenance.

Official Project Official Eggdrop Page ↗

Eggdrop is the oldest Internet Relay Chat (IRC) bot still in active development. Originally created by Robey Pointer in December 1993 for use on a channel called #gayteen, it has spawned an almost cult-like following of users. It is a feature rich program designed to be easily used and expanded upon (using Tcl scripting) by both novice and advanced IRC users on a variety of hardware and software platforms.

Latest Release Tcl/Tk 9.0.3 (Nov 13, 2025) ↗

Tcl/Tk 9.0 is the latest major release of both Tcl and Tk. It features many new capabilities, and presents some incompatibilities with Tcl/Tk 8.

chatGPT v1.3.17
chatGPT (eggdrop 1.8.4+/tcllib 1.18+)
Dernière mise à jour 27/01/2026 · 6 KB
DansTonChat v1.14.7
Dans Ton Chat
Dernière mise à jour 15/12/2025 · 7 KB
ddg v1.0.7
Recherche DuckDuckGo (bêta)
Dernière mise à jour 09/01/2026 · 6 KB
meteo v1.3.2
Météo (wttr.in, HTTPS/SNI, emojis)
Dernière mise à jour 05/02/2026 · 6 KB
vdm v1.1.2
Vie De Merde (VDM)
Dernière mise à jour 08/02/2026 · 5 KB
youtube_search v1.2.1
Recherche YouTube (API v3)
Dernière mise à jour 21/10/2025 · 5 KB

Links

GitHub

Repo: teuk/mediabot_v3 · cache: 29/03/2026 22:30:45 · clones (14d): 7 · uniques: 6

Recent commits
SHAMessageAuthorDate
d31f3ce 🧹 Hermione cleaned the common room — Context.pm completed, Command.pm aligned, all _ctx handlers migrated to require_level, radio wrappers extracted, legacy auth blocks banished teuk 2026-03-29
595b774 🧙 The Sorting Hat granted Libera.Chat a 15-second grace period — Net::Async::IRC now completes its CAP negotiation before the timer checks is_connected, and the test cauldron keeps its conf and silen teuk 2026-03-10
c991749 Document live IRC test framework setup and usage teuk 2026-03-08
0074758 🪄 The Sorting Hat finally placed auto_join in populateChannels where it belonged — live IRC test framework now conjures a real bot, a spy client, and 13 passing spells against a dedicated MariaDB tes teuk 2026-03-08
bc7e986 Update README with test framework and daemon mode instructions teuk 2026-03-07
9bec9eb 🧪 Add unit test framework with mocks and 115 passing spells teuk 2026-03-07
39b502d 🧙 Banished the blocking curl Horcruxes, reforged setRadioMetadata into a proper Context spell, and fixed the ancient argument-order curse haunting the legacy dispatch path teuk 2026-03-04
1d2c68a Cast the Great Refactoring Charm upon reconnect(), conjured Context-aware spells for tmdb, tmdblangset and tellme, and awakened the Partyline with its full grimoire of commands teuk 2026-03-04
7281a5a 🪄 Expecto UTF8um – fix .meteo UTF-8 + HTTP::Tiny teuk 2026-01-30
4a38f86 Revise README with current Mediabot updates teuk 2025-12-31

README

Mediabot - https://teuk.org

Mediabotv3 is a perl Net::Async::IRC bot now tho I started it with Net::IRC which is now deprecated It is still a beta version after all these years but a release is coming up WHAT IS MEDIABOT? Mediabot is a Net::Async::IRC bot tested on Undernet ircu server, Libera and Epiknet (but it may supports other networks) The bot joins a console channel where it will notice its action Go to the Wiki section and read Installation chapter to know how to deploy it. The full documentation is in the Wiki section : https://github.com/teuk/mediabot_v3/wiki

mediabot_v3

I've been coding this bot for a while, and it's time to write documentation (about time) This perl bot is using Net::Async::IRC and a MySQL/MariaDB backend. I tried to make things easier to install by running the configure script but sometimes it needs manual actions. Check the Installation chapter for hints. I hope you'll have fun using mediabot :) TeuK

Notes

Get the latest news on Mediabot here : https://teuk.org/forum

Installation

Creating a dedicated user

This is an installation example on Debian GNU/Linux 11 (bullseye) Add a mediabot user :

sudo useradd -m -s /bin/bash mediabot

Now, give sudo rights to mediabot user and keep in mind that you MUST remove this file after the installation ! If you don't, you let an irc bot running with root privileges (trust me you don't want that).

echo 'mediabot ALL=(ALL) NOPASSWD:ALL' | sudo tee /etc/sudoers.d/mediabot

Required packages installation

Install needed packages :

sudo apt install build-essential mariadb-server default-libmysqlclient-dev default-libmysqld-dev git curl

Bot installation

Now get the bot as mediabot user and run configure script :

sudo -iu mediabot
git clone https://github.com/teuk/mediabot_v3
cd mediabot_v3

The following script is supposed to do all the work for DB creation and Perl modules installation (but you may have to do manual actions sometimes) :

./configure

Running the test framework

Before running the bot, you can verify that the core logic is working correctly by running the test suite (no IRC connection required) :

perl t/test_commands.pl

All tests should pass :

[ 01_context.t ]
[ 02_dispatch.t ]
[ 03_auth.t ]
[ 04_mockbot.t ]
============================================================
PASSED : 115/115  (13s)
============================================================

For detailed output of each individual test :

perl t/test_commands.pl --verbose

Available options :

--verbose, -v          Show each test result [OK]/[FAIL]
--filter,  -f <pat>    Run only files matching <pat>  (e.g. --filter 03)
--nick,    -n <nick>   Default nick for test messages  (default: testuser)
--host        <host>   Default hostname                (default: test.host)
--channel, -c <chan>   Default channel                 (default: #test)
--botnick, -b <n>      Bot nick                        (default: mediabot)
--cmdchar     <char>   Command character               (default: !)

Running the live IRC test framework

The live test framework connects a real bot instance and a spy client to an IRC server, creates a dedicated mediabot_test database, runs a series of end-to-end tests, then tears everything down automatically.

Requirements :

  • An accessible IRC server (local ircu on localhost:6667 is recommended for speed and reliability)
  • sudo mysql access (socket authentication, no password required)
  • All Perl dependencies already installed by ./configure

Basic usage against a local ircu server :

perl t/test_live.pl --server localhost --port 6667 --channel '#mbtest'

All tests should pass :

[ 01_connect.t ]
[ 02_commands.t ]
[ 03_auth_live.t ]
============================================================
PASSED : 13/13  (22s)
============================================================

For detailed output of each individual test :

perl t/test_live.pl --verbose --server localhost --port 6667 --channel '#mbtest'

Keep the test database after the run for inspection :

perl t/test_live.pl --keep-db --server localhost --port 6667 --channel '#mbtest'

Available options :

--server, -s  <host>   IRC server              (default: irc.libera.chat)
--port        <port>   IRC port                (default: 6667)
--channel, -c <chan>   Test channel            (default: ##mbtest)
--botnick, -b <nick>   Bot nick                (default: mbtest_XXXX)
--spynick     <nick>   Spy client nick         (default: mbspy_XXXX)
--cmdchar     <char>   Command character       (default: !)
--timeout, -t <sec>    Per-reply timeout       (default: 30)
--keep-db              Keep mediabot_test DB after tests
--verbose, -v          Show each test result [OK]/[FAIL]
--filter, -f  <pat>    Run only files matching <pat>  (e.g. --filter 02)

Running the bot

If everything's ok then test in foreground using your config file e.g :

./mediabot.pl --conf=mediabot.conf
[06/08/2022 06:31:37] Reading configuration file mediabot.conf
[06/08/2022 06:31:37] mediabot.conf loaded.
[06/08/2022 06:31:37] Getting current version from VERSION file
[06/08/2022 06:31:37] -> Mediabot devel version 3.0 (20220801_111934)
[06/08/2022 06:31:37] Checking latest version from github (https://raw.githubusercontent.com/teuk/mediabot_v3/master/VERSION)
[06/08/2022 06:31:37] -> Mediabot github devel version 3.0 (20220801_111934)
[06/08/2022 06:31:37] Mediabot is up to date
[06/08/2022 06:31:37] Mediabot v3.0dev-20220801_111934 started in foreground with debug level 0
[06/08/2022 06:31:37] Logged out all users
[06/08/2022 06:31:37] Picked irc.mediabot.rules from Network Mediabot_Rules
[06/08/2022 06:31:37] Initialize Hailo
[06/08/2022 06:31:37] Connection nick : mediabot
[06/08/2022 06:31:37] Trying to connect to irc.mediabot.rules:6667 (pass : none defined)
[06/08/2022 06:31:37] *** Looking up your hostname
[06/08/2022 06:31:37] *** Checking Ident
[06/08/2022 06:31:37] *** Found your hostname
[06/08/2022 06:31:37] *** Got ident response
[06/08/2022 06:31:37] on_login() Connected to irc server irc.mediabot.rules
[06/08/2022 06:31:37] Checking timers to set at startup
[06/08/2022 06:31:37] No timer to set at startup
[06/08/2022 06:31:37] on_login() Setting user mode +i
[06/08/2022 06:31:37] Trying to join #mediabot
[06/08/2022 06:31:37] No channel to auto join
[06/08/2022 06:31:37] -irc.mediabot.rules- Highest connection count: 2 (2 clients)
[06/08/2022 06:31:37] -irc.mediabot.rules- on 1 ca 1(4) ft 10(10) tr

And you should see the bot join on #mediabot console channel :

[06:30:25] * Now talking in #mediabot
[06:31:39] * Joins: mediabot (mediabot@mediabot.mediabot.rules)

To run the bot in daemon mode :

./mediabot.pl --conf=mediabot.conf --daemon

Always have a look at what is going on :

tail -40f mediabot.log

DON'T FORGET TO REMOVE SUDO RIGHTS, THIS IS IMPORTANT ! :

sudo rm -fv /etc/sudoers.d/mediabot

Once you did all that, register your bot and see the commands available in Wiki section : https://github.com/teuk/mediabot_v3/wiki