Est. 1995 Beginner

mIRC Scripting Language

The event-driven scripting language embedded in the mIRC client that powered a generation of IRC bots, channel-protection scripts, and custom chat tools on Windows.

Created by Khaled Mardam-Bey

Paradigm Multi-paradigm: Event-Driven, Procedural
Typing Dynamic, Weak (no syntactic distinction between code and plain text)
First Appeared 1995
Latest Version mIRC 7.83 (November 12, 2025)

The mIRC scripting language — commonly abbreviated mSL — is the scripting language embedded inside mIRC, the long-running Internet Relay Chat (IRC) client for Microsoft Windows created by Khaled Mardam-Bey. Far more than a configuration mechanism, mSL is a full event-driven, procedural programming language that lets users redefine commands, respond to chat events, build graphical dialogs, manipulate files, and automate nearly every aspect of the client. For a generation of internet users in the late 1990s and 2000s, mSL was the first programming language they ever wrote — learned not in a classroom but in a chat window, while building a bot to guard a favorite channel.

History & Origins

mIRC was created by Khaled Mardam-Bey, a British programmer, who began development in 1994 and released the first version, mIRC 1.0, on February 28, 1995. He has said he built it because the first IRC clients for Windows lacked some basic IRC features he wanted. The client quickly became one of the most popular ways to access IRC on Windows.

The scripting language was not a grand upfront design. It grew organically alongside the client. In the earliest versions, only commands directly related to IRC were available, and capabilities were added on an ad-hoc basis as users demanded more customization. Through the mIRC 3.x and 4.x releases around 1997, mSL matured into the form recognizable today, acquiring aliases, remote event handlers, custom identifiers, and variables. This incremental, demand-driven evolution gave mSL both its remarkable flexibility and its famous quirks.

By the early 2000s, mIRC had been downloaded tens of millions of times — reportedly over 40 million by 2003, when it ranked among the top ten most popular internet applications. A vast ecosystem of user-written scripts, add-ons, and “war scripts” grew up around it, traded on websites and within IRC channels themselves.

Design Philosophy

mSL reflects the pragmatism of a language that evolved to serve a single application’s users rather than a formal specification. A few principles define its character:

Scripting Is the Application

In mIRC, scripting is not bolted on — it is woven into the client. Users can type mSL directly into the message box, save reusable commands as aliases, and register remote scripts that fire automatically when IRC events occur. The line between “using mIRC” and “programming mIRC” is deliberately blurry, which is a large part of why so many casual users ended up writing real code.

Code and Text Are the Same Thing

One of mSL’s most distinctive — and most divisive — design decisions is that it makes no syntactic distinction between code and plain text. Strings are not enclosed in quotes. Code is frequently embedded directly among ordinary text and evaluated in place. This makes simple scripts extremely concise, but it also creates parsing ambiguities that scripters must learn to navigate, and it is the root of an entire class of injection vulnerabilities.

Sigils Everywhere

mSL uses leading sigils to distinguish its constructs, a convention loosely reminiscent of shell and Perl scripting:

  • $ precedes identifiers — both built-in functions like $me, $nick, and $time, and custom ones defined as aliases.
  • % precedes ordinary variables, whether local or global.
  • & precedes binary variables, used for handling raw byte data.

C-Flavored Structure

While its evaluation model is unusual, mSL inherits much of its block structure from the C programming language, using curly braces { } to group statements within aliases, events, and control-flow constructs like if, while, and goto.

Key Features

Aliases

Aliases are mSL’s equivalent of functions. They define new commands that can take parameters, return values, and even override built-in commands and identifiers. A trivial alias might look like:

alias greet {
  msg $active Hello, $1 $+ ! Welcome to the channel.
}

Typing /greet Alice in a channel would send a greeting. Here $active is the active window, $1 is the first parameter, and $+ concatenates without a space.

Remotes and Events

Remote scripts are event handlers — they run automatically when a matching IRC event occurs. Events are declared with the on keyword:

on *:JOIN:#:{
  msg $chan Welcome to $chan $+ , $nick $+ !
}

on *:TEXT:!time:#:{
  msg $chan The current time is $time
}

The first handler greets anyone who joins a channel; the second responds to anyone who types !time. This event-driven model is what makes mSL ideal for bots and channel automation.

Popups

Popups define entries in mIRC’s right-click context menus. Selecting a popup entry runs its associated mSL code, letting scripters add custom menu commands to nickname lists, channels, and the main window.

Dialogs and Custom GUIs

mSL includes a dialog system for building graphical windows with buttons, edit boxes, lists, and other controls. The community extended this further with native DLL libraries such as DCX and MDX, enabling sophisticated, modern-looking interfaces — control panels, games, and media tools — built entirely as mIRC scripts.

File and Data Handling

mSL provides extensive file system access — reading, writing, renaming, and deleting files — along with hash tables, INI-file manipulation, and binary variables for raw data. This power made mSL genuinely capable, but combined with its code-is-text evaluation it also created real security risks.

Identifiers

Identifiers are built-in functions accessed with the $ sigil. mIRC ships with hundreds of them — $nick, $chan, $me, $server, $rand(1,100), $read(file.txt) — covering IRC state, math, string manipulation, files, and system information. Custom aliases can act as user-defined identifiers, returning values with the return command.

Security and the $decode Exploit

mSL’s power over the file system and its lack of a code/text boundary made it a perennial security concern. The most infamous incident was the $decode exploit, which gained widespread notoriety around August 2001. Attackers would trick users into pasting an innocuous-looking encoded string into mIRC; when decoded and evaluated, it executed arbitrary mSL commands and could effectively hand control of the victim’s client — and files — to the attacker.

In response, later releases (notably version 6.17, released February 17, 2006) disabled the dangerous $decode/$encode evaluation behavior by default and added other safeguards. The episode remains a textbook example of the dangers of a scripting language that does not cleanly separate executable code from displayed text, a class of problem mSL scripters still guard against today through careful input handling.

Evolution

mSL has grown continuously alongside the mIRC client for three decades:

EraApprox. YearSignificance
mIRC 1.01995First release; rudimentary IRC-only scripting
mIRC 3.x–4.x~1997mSL matures into modern form: aliases, remotes, identifiers
mIRC 5.91late 1990sLast version to support 16-bit Windows
mIRC 6.x2002+Drops 16-bit support; security hardening of the parser
mIRC 7.12010Adds Unicode and IPv6 support
mIRC 7.832025Latest maintenance release; mSL still actively developed

Notable later additions included Unicode text handling (from version 7.1 in 2010), expanded binary variable limits and string lengths in the 6.x series, regular expression support via $regex, JSON handling in recent 7.x releases, and ongoing parser improvements. The scripting parser historically supported a maximum line length of around 8,292 characters, one of several limits scripters learned to work within.

Current Relevance

IRC is no longer the dominant chat medium it was in the late 1990s and early 2000s, having ceded ground to Discord, Slack, and other platforms. Yet mIRC and its scripting language remain actively maintained: version 7.83 was released on November 12, 2025, more than thirty years after the original. The client continues to receive new identifiers, security fixes, and modern protocol support.

mSL’s reach also extends beyond mIRC itself. AdiIRC, another Windows IRC client, implements substantial compatibility with the mIRC scripting language, allowing many mSL scripts to run outside of mIRC. A dedicated community continues to document the language through resources such as the WikiChip mIRC reference and the mIRC Scripting Knowledge Base.

Why It Matters

The mIRC scripting language occupies a special place in programming history not because of technical elegance — it has plenty of rough edges — but because of who it taught. For countless people, mSL was a first encounter with variables, conditionals, loops, event handling, and the thrill of making a computer do something on its own. The feedback loop was immediate and social: write a few lines, and a bot in your channel would greet your friends or win a trivia game.

mSL is also a case study in organic language design. Rather than springing from a specification, it accreted features one user request at a time, embedded inside a single application. That history produced both its expressive convenience and its notorious security pitfalls — most memorably the $decode exploit. As a portrait of how a chat client accidentally became a programming environment for a generation of internet users, the mIRC scripting language is a genuine piece of computing archaeology that is, remarkably, still alive.

Sources

Timeline

1994
Khaled Mardam-Bey, a British programmer, begins developing mIRC because he feels the early Windows IRC clients lack basic IRC features.
1995
mIRC 1.0 is released on February 28, 1995. A rudimentary scripting capability ships from the start, initially limited to commands directly related to IRC.
1997
Through the mIRC 3.x and 4.x releases (around 1997), the scripting language matures into recognizably modern mSL, gaining aliases, remote event handlers, identifiers, and variables. This era established most of the syntax still used today.
2001
The $decode exploit comes to prominence in August 2001, in which users are tricked into pasting encoded text that executes arbitrary commands and can hand control of mIRC to an attacker — a notorious example of mSL's power being turned against users.
2002
The mIRC 6.x series arrives (6.03 released August 16, 2002), dropping 16-bit Windows support; version 5.91 was the last to support 16-bit Windows.
2003
mIRC is reported to have been downloaded over 40 million times and is ranked among the top ten most popular internet applications, reflecting the height of IRC's mainstream popularity.
2006
Version 6.17 (released February 17, 2006) disables the $decode/$encode behavior by default and tightens script security in response to the earlier exploit, part of an ongoing effort to harden the scripting engine against social-engineering attacks.
2010
mIRC 7.1 (released July 30, 2010) adds Unicode and IPv6 support, modernizing the client and giving mSL scripts full Unicode text handling.
2025
mIRC 7.83 is released on November 12, 2025, continuing active maintenance of the client and its scripting language more than thirty years after the first release.

Notable Uses & Legacy

IRC Bots and Channel Management

mSL is widely used to write IRC bots that manage channels — greeting users, enforcing rules, kicking and banning troublemakers, maintaining op lists, and responding to commands. Many small channels ran entirely on a mIRC bot rather than a dedicated server-side bot.

Channel Protection and Anti-Flood Scripts

Operators built protection scripts in mSL to defend channels against floods, clones, and takeover attempts, automatically detecting abusive patterns and reacting with bans or mode changes in real time.

Custom Dialogs and GUI Tools

Using mSL's dialog support, often extended with libraries such as DCX and MDX, scripters created rich graphical add-ons — control panels, games, media players, and themed interfaces — layered on top of the mIRC client.

DCC File Sharing and Fserve Scripts

mSL powered file-serving scripts (fserves) and XDCC bots built on mIRC's DCC protocol support, which became a major file-distribution mechanism in IRC communities during the late 1990s and 2000s.

Trivia, Games, and Channel Entertainment

Community scripters built trivia bots, dice and card games, and interactive channel entertainment entirely in mSL, taking advantage of its tight integration with chat events and text output.

Language Influence

Influenced By

Influenced

AdiIRC

Running Today

Run examples using the official Docker image:

docker pull
Last updated: