thern·cdn
← all TCL scripts
url-shortenerv1.0url-shortener.tcl · 5.0 KB · updated 2026-07-20
tclWhat it doesrequires eggdrop 1.8+ · Tcl http + tls

Watches the channel for long links. Any URL of 40 characters or more is shortened through url.thern.io and echoed back together with the page's HTML title, so nobody has to click a mystery link.

Shortening goes through https://url.thern.io/api/shorten; titles are fetched with a 8 s timeout, max 3 redirects.

eggdropInstalldrop-in
# 1 · fetch the script into your eggdrop's scripts/ dir
cd ~/eggdrop && curl -fsSL https://cdn.thern.io/files/tcl/url-shortener.tcl \
  -o scripts/url-shortener.tcl

# 2 · load it from eggdrop.conf
echo 'source scripts/url-shortener.tcl' >> eggdrop.conf

# 3 · apply without restarting the bot
.rehash  # type this in the bot's DCC/party line
Usage3 commands
no chat command — it reacts to URLs posted in the channel
set urlshort::minlen 40 ;# only shorten links this long
set urlshort::ignorechan {#chan1 #chan2} ;# channels to stay quiet in
Download5.0 KB · 2026-07-20
url-shortener.tcl url-shortener · 1.0
tcl5.0 KB2026-07-20get