IRC Guides Β· Clients
mIRC scripting basics (mSL)
Intermediate Β· about 18 min read
mIRC includes mSL (mIRC Scripting Language). You can automate joins, react to text, build small tools, or load full script packs. This is a practical starter β not a full language reference (see the built-in help: Help β Contents β Scripting).
Addons and packs: mIRC downloads.
1. Open the script editor
Press Alt+R (or Tools β Script Editor). Tabs include Aliases, Remote, Popups, and Users. Most bots and channel tools live under Remote.
2. Aliases
An alias is a custom command. Example β type /hi in a channel:
alias hi {
describe $chan waves hello
}
Or with parameters:
alias greet {
; /greet Nick
msg $1 Hello $1 $+ !
}
3. Events
Remote scripts use on events. Example: answer !ping in a channel:
on *:TEXT:!ping:#:{
msg $chan Pong, $nick $+ !
}
Other useful events: on JOIN, on PART, on NICK, on NOTICE, ctcp. Prefixes like * mean βanyβ matching level; you can restrict to ops or specific channels.
on *:JOIN:#mychan:{
; do not flood β simple example only
notice $nick Welcome to $chan $+ , $nick
}
4. Variables and identifiers
$meβ your nick$chanβ active channel$nickβ user who triggered the event$1,$2β¦ β parameters%varβ global script variable;set %var value$rand(1,6)β random number
on *:TEXT:!roll:#:{
msg $chan $nick rolled $rand(1,6)
}
5. Load a .mrc file or script pack
- Download from Addons or Script packs.
- Alt+R β File β Load β select the
.mrc(or follow the packβs readme; some use installers). - Ensure Remote is enabled (the checkmark in the script editor).
/run. Load one piece at a time, read the code, and keep backups of your mirc.ini and scripts folder.
Trivia and channel bots such as snIRC are separate programs (see mIRC Bots), not plain .mrc snippets.