Est. 1995 Beginner

mSL (mIRC Scripting Language)

The event-driven scripting language built into mIRC, the Windows IRC client — a sigil-flavored, dynamically typed language that a generation of teenagers used to write their first chat bots, channel protectors, and file-serving scripts.

Created by Khaled Mardam-Bey

Paradigm Event-driven, procedural scripting
Typing Dynamic, weak (untyped text-based)
First Appeared 1995
Latest Version Bundled with mIRC 7.83 (November 2025); mSL has no independent version number

mSL — the mIRC Scripting Language — is the event-driven scripting language embedded inside mIRC, the long-running Internet Relay Chat (IRC) client for Windows. “mSL” is an informal abbreviation; the language has no official name of its own and no version number independent of the client that hosts it. For a generation of internet users in the late 1990s and 2000s, mSL was a first programming language: you could open mIRC’s built-in script editor, type a few lines, and have a working chat bot or custom command minutes later, all without installing a compiler or leaving the chat window.

It is a dynamically typed, text-oriented language with a distinctive surface syntax — variables and functions are marked by leading sigils ($, %, and &) — and an execution model driven almost entirely by events: messages arriving from the IRC server, input typed by the user, or timers firing. mSL is proprietary to mIRC (and to a small number of compatible clients), runs only on Windows (or under Wine), and grew not from a formal language design but organically, one command at a time, as users demanded ever more customization.

History and Origins

Khaled Mardam-Bey, a British programmer, began developing mIRC in late 1994 and released its first version on 28 February 1995. He has said he created mIRC because the first IRC clients for Windows lacked some basic features he wanted. The early scripting capability was minimal and pragmatic: commands were added on an ad-hoc basis, and at first only those directly tied to IRC itself.

That pragmatism shaped everything that followed. There was no upfront grammar, no specification, and no notion of a separate “language” — just a steadily growing set of slash-commands and $-prefixed identifiers bolted onto the client. As demand for customization grew, so did the command set. By the 3.x and 4.x release series (around 1996), mSL had acquired most of the constructs recognizable today: aliases, popups, remote event handlers, identifiers, and the sigil-based variable system. The version-5 era then turned it into something far more capable than a macro language, adding raw network sockets, custom GUI dialogs, and access to Windows COM objects.

Design Philosophy

mSL was never “designed” in the way a language like Pascal or Go was. Its character comes from the constraints of its host:

  • Everything is text. IRC is a line-based text protocol, and mSL reflects that. Values are strings; there is no strong type system. A number is just a string that happens to look numeric, and operations interpret text as needed.
  • Event-driven by default. Scripts normally run only in response to something happening — an IRC message, a user action, a timer, or a socket event. The central scripting file type, the remote script, is essentially a collection of on EVENT:... handlers.
  • Sigils mark intent. A leading $ denotes an identifier (a built-in function or a custom one that returns a value), % denotes a variable (local or global), and & denotes a binary variable holding raw bytes. This makes the role of every token visible at a glance.
  • Low barrier, high ceiling. The integrated editor, instant feedback inside a live chat session, and famously detailed help file made the on-ramp gentle, while sockets, dialogs, and COM let determined scripters build surprisingly complete applications.

Key Features

mSL organizes scripting around a handful of named constructs:

  • Commands — built-in actions invoked with a leading slash, e.g. /msg, /echo, /timer.
  • Identifiers — built-in functions that return a value, written with $, e.g. $nick, $time, $calc(...).
  • Aliases — user-defined commands. An alias that returns a value is a custom identifier.
  • Popups — scripted entries added to context (right-click) menus, run when the user selects them.
  • Remotes — event-handling scripts; the on handlers that fire when their triggering event occurs.

Variables are dynamically typed and need no declaration. Local variables are created with /var and discarded when the current alias or event returns; global variables are created with /set and persist until explicitly removed. Notably, mSL has no array type — the idiomatic structured-data store is the in-memory hash table, which keeps large data sets in RAM for fast lookup. Binary variables (&name) hold raw byte data and, in modern versions, can grow to large sizes (early builds capped them at 8,192 bytes).

A small remote script — an event handler plus a custom alias — shows the flavor of the language:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
; a remote: greet anyone who joins #mychannel
on *:JOIN:#mychannel: {
  msg $chan Welcome, $nick $+ ! You are visitor number $visitcount
}

; a custom identifier (alias returning a value)
alias visitcount {
  inc %joins
  return %joins
}

Here on *:JOIN:... is a remote event, $chan and $nick are built-in identifiers, $+ concatenates, %joins is a global variable, and $visitcount calls the custom alias defined below it.

Evolution

Because mSL ships inside mIRC, its history is mIRC’s release history. Several releases stand out as inflection points for the language:

  • TCP sockets (1997). mIRC v5.3 (13 December 1997) added the /sockopen and /sockwrite socket commands, letting scripts speak arbitrary text protocols — HTTP, custom bot links, and more — well beyond IRC. (DCC file-transfer support, by contrast, had been part of mIRC since its first release in 1995.)
  • Custom dialogs (1999). mIRC v5.5 (8 January 1999) introduced the /dialog command and dialog table definitions, enabling full custom GUI windows. This is what made elaborate “script packs” — complete reskins of the client — possible.
  • COM/ActiveX (2001). mIRC v5.9 (26 April 2001) added the $com identifier, exposing Windows Component Object Model objects to scripts and letting mSL drive other Windows software.
  • Security hardening (mid-2000s). As mSL’s power attracted abuse, later 6.x releases tightened defaults — for example disabling the $decode identifier by default to curb worm-style script injection that spread through unsuspecting users.
  • Unicode and IPv6 (2010). mIRC 7.1 (30 July 2010) brought full Unicode and IPv6 support, modernizing the text engine the language sits on. (mIRC 6.35 had been the last release to run on Windows 95/98/ME and NT 4.0.)

Development has continued steadily; mIRC 7.83 shipped on 12 November 2025, carrying the same scripting language forward into its fourth decade.

Current Relevance

IRC is far smaller than it was at its peak, and mSL is firmly a niche language today. Yet it remains actively maintained as part of mIRC, which has been downloaded tens of millions of times over its lifetime and was once ranked among the most popular internet applications. The language also lives on in compatible clients — notably AdiIRC, which implements a large subset of mSL so that existing scripts continue to run. Communities of scripters still maintain documentation wikis, knowledge bases, and forums, and legacy bots and script packs continue to operate on the IRC networks that survive.

Why It Matters

mSL’s significance is less about language design than about access. It was an unusually frictionless on-ramp to programming: integrated into software people already used socially, with immediate visible results, a forgiving untyped model, and a famously thorough help file. Countless programmers wrote their first conditional, their first loop, and their first network-aware program in mSL — building a bot to guard a channel or serve a file to a friend.

It is also a case study in organic language growth. With no specification and no committee, mSL expanded one command at a time in response to what its users wanted to do, accreting sockets, dialogs, hash tables, and COM bindings until a single-app macro language could build full networked applications. That same unplanned growth produced rough edges — strings are not syntactically delimited, so literal text can be misread as syntax — but it also captured exactly what a large, motivated user community asked for. As both a beloved first language and a living artifact of the IRC era, mSL earns its place in the archaeology of programming.

Timeline

1994
Khaled Mardam-Bey, a British programmer, begins developing mIRC in late 1994, motivated by what he felt were missing basic features in the first Windows IRC clients.
1995
mIRC's first version is released on 28 February 1995. Early scripting support is rudimentary: commands are added on an ad-hoc basis, and initially only those directly related to IRC.
1996
Across the 3.x and 4.x release series, mSL acquires most of the core syntax recognizable today — aliases, popups, remote event handlers, identifiers, and the $/%/& variable sigils — as users push the client toward heavier customization.
1997
mIRC v5.3 (13 December 1997) introduces raw TCP socket scripting via the /sockopen and /sockwrite commands — turning mSL into a general network-scripting tool, not just an IRC macro language. (DCC file-transfer support had been present since mIRC's first release.)
1999
mIRC v5.5 (8 January 1999) adds the /dialog command, letting scripts build full custom GUI dialog windows — a major leap that enabled script packs to completely reskin the client.
2001
mIRC v5.9 (26 April 2001) adds the $com identifier, exposing Windows COM/ActiveX objects to scripts and dramatically widening what mSL could automate on the host system.
2002
mIRC 6.0 is released on 3 February 2002, consolidating the version-5 scripting feature set. The 5.91 release had been the final version to support 16-bit Windows.
2010
mIRC 7.1 is released on 30 July 2010, adding full Unicode and IPv6 support. mIRC 6.35 had been the last build to run on Windows 95/98/ME and NT 4.0; version 7 requires Windows XP or later.
2025
Development continues three decades on; mIRC 7.83 ships on 12 November 2025, still carrying and extending the same embedded scripting language.

Notable Uses & Legacy

Channel-management bots

The most common use of mSL: scripted bots that sit in an IRC channel and handle ops, kicks, bans, greetings, and flood control automatically — many people's first encounter with programming was writing one.

File-serving and XDCC bots

On networks like DALnet, EFnet, and Undernet, mSL scripts ran 'fserves' and DCC/XDCC distribution bots that queued and sent files to requesters, an entire file-sharing subculture built on the language's socket and DCC commands.

Channel games and trivia bots

Trivia engines, word games, and gambling/score scripts were a staple of social channels, all implemented as mSL remotes responding to channel messages.

Script packs and client themes

Full 'script packs' bundled aliases, popups, custom dialogs, and toolbars to completely reskin and re-feature mIRC, distributed as downloadable .mrc files that users loaded into their client.

Flood and attack protection

Defensive scripts that detected and mitigated nick floods, CTCP floods, and clone attacks were widely shared, since IRC of the era exposed users directly to such abuse.

Language Influence

Influenced

AdiIRC scripting

Running Today

Run examples using the official Docker image:

docker pull
Last updated: