Skip to content

Native alias integration

Aliases are command shortcuts you define in the Aliases dialog or with /alias. They are independent of scripts. Default aliases are /j, /p, /w, /q, /m, /n, /slap and /ns.

  • The Aliases button opens a graphical editor with a live preview.
  • /alias lists aliases; /alias name shows one.
  • /alias name command | command ... defines an alias. The | split happens once, when you define it.
  • /alias -d name deletes; /alias -on name and /alias -off name enable and disable; /alias -reset restores the default pack; /alias -echo on|off toggles the echo.

One command per line, at most 16 lines per alias. The leading / is optional. Names are case-insensitive letters, digits and underscores, 1 to 32 characters.

Token Meaning
$1 … $99 The nth argument; empty if missing
$n- Argument n to the end
$n-m Arguments n to m, inclusive
$$n Like $n, but the alias does not run if the argument is missing
$0 The number of arguments
$me Your current nickname
$chan The channel window you typed in
$target, $active The channel or conversation window you typed in
$network, $server The network name; the server that welcomed you
\$ A literal $
!command Run the built-in even if an alias has that name

The command word must be literal. Substituted text is never scanned again, never split on |, and never turns into another command.

  • Expansion is validated before anything is sent.
  • Expanded commands use the normal outbound rate limit.
  • quote, server, quit, connect and disconnect may appear in an alias only if you tick Allow raw and connection commands in the editor. Aliases created with /alias or imported never get that permission.
  • Only text you type expands aliases. Received messages, topics and server replies never can.
  • Messages to services and anything that may carry credentials are hidden from the echo.

500 aliases; 16 lines of 1024 bytes each; nesting depth 8; at most 16 commands per use.

With the aliases permission:

swizzin.alias(name, args?, network?, target?)

This runs one of your own native aliases through the normal command dispatcher, with the same expansion, credential checks and nesting limits as typed input.

  • target is the conversation it runs in (used for $chan).
  • Only enabled aliases without the Allow raw and connection commands option qualify.
  • The result may only be chat lines, joins and parts, at most 10 lines.
  • It runs only while the network is connected.
  • Refusals are written to the Console with the reason.

Because of these rules a script can never reach /quit, /quote, /server or connection control through an alias.