Skip to content
Sven edited this page Jul 14, 2017 · 16 revisions

MTS DRAFT 8.2 - VERSION 1.1 Themer reference

*** This is for the MTS 1.1 draft. Few things have changed in this draft from the 1.0 version, so themes you make with this reference will most likely be compatible with engines that support the 1.0 draft. This smaller document is geared toward themers and is a scaled down and slightly edited version of the full MTS draft. To view the full MTS draft, please see MTSDRAFT82.

Also, sample theme files can be found at: https://github.com/acvxqs/MTS-Themes

CONTENTS

TERMINOLOGY

"MTS" is mIRC Theme Standard- this document, and any script that uses the concepts within to handle themes. "script" refers to a script that handles theme output- in other words, the theme engine. "theme" refers to an actual theme or theme file that has been loaded. "event" is something that occurs on mIRC that can have it's output reformatted. "raw" is a special type of IRC event referred to by a number from 001 to 999. "variables" are used to store information relating to an event or raw, to later be formatted by the theme.

A "MTS" "script" will take IRC "events" and "raws", store relevant data in "variables", and use the information in a "theme" to format them for display.

CHAPTER 1 - BASIC FORMAT FOR AN MTS THEME FILE

All MTS theme files should have an extension of .MTS. MTS files are simple text files, where each line contains one event, raw, setting, or other piece of theme-related information.

You may have blank lines, and any line beginning with a semicolon (;) will be treated as a comment and ignored.

Themes may refer to external files such as images or a .MRC file. These files must be in the same directory as the theme .mts file. For example, ultra.MTS refers to ultra.MRC and BK.PNG. These files would be in the same directory as the ultra.mts file.

IT IS HIGHLY RECOMMENDED THAT .MTS FILES BE PUT IN THEIR OWN SUBDIRECTORY SO THAT SUPPLEMENTAL THEME FILES DO NOT CONFLICT WITH OTHER THEMES.

You can also find a public all purpose theme engine in order to test your themes out at www.mircscripts.org, made by Eric^^. Keep in mind that his engine is the most popular right now, but if you find problems in it, remember that they are problems with his engine, not with the MTS standard. Make sure you report any problems you find to him.

contents

CHAPTER 2 - FORMAT OF EVENTS AND RAWS IN MTS THEME FILES

Each event or raw has one line in an .MTS file. The line starts with a code that signifies the event or raw. The remainder of the line is the text displayed for that event, but will contain special variable <codes> that will get replaced when the actual event occurs. For example-

TextChan [<nick>] <text>

This is a basic theme line for text in a channel window. When it is displayed, the script will replace <nick> with the nickname of the user, and <text> with what they said.

Some (or all) events may instead refer to aliases or lines of code. For example-

TextChan !Script theme.chantext

A special variable, %:echo, contains the command the alias should use to display it's text. A short example alias that could be part of a theme's script file:

alias theme.chantext {
  %:echo ( $+ $lower(%::nick) $+ ) %::text
}

These aliases are stored in a separate .MRC file.

Note that "!Script" by itself is not an error- it simply "does nothing", preventing any output. This is equivalent not having anything after the first word on the line, such as

TextChan

by itself.

contents

CHAPTER 3 - VARIABLES USED IN EVENTS AND RAWS

All-purpose variables: (these must be set in all events and raws)

%:echo          Command being used to display text. Use in place of /echo.
%::me           Your nickname.
%::server       The server you are currently connected to. (if connected)
%::port         The port you are currently connected to. (if connected)
%::pre          Set to the value of Prefix. (see Prefix option.)
%::c1           Base color 1. (see BaseColors option)
%::c2           Base color 2. (see BaseColors option)
%::c3           Base color 3. (see BaseColors option)
%::c4           Base color 4. (see BaseColors option)
%::timestamp    The current timestamp, using the script's Timestamp line
                format. Used by <timestamp> in theme files.

Variables used in events:

%:comments      Used by all events. These comments are for a script to add
                any additional text to a line, and should therefore be
                appended to the end of any displayed line. A normal text
                line (one not using !Script) does not need to do anything
                with this- the script should append it automatically when
                used. For this reason there is no corresponding <comments>
                code.

%::text         The text or message from the event. (if any)

                For CTCP, CTCPSELF, CTCPREPLY, CTCPREPLYSELF- Additional
                text for the CTCP, beyond the command.
                
                For NOTIFY, UNOTIFY- Notify note, if any.

%::parentext    For KICK, KICKSELF, QUIT, PART, NOTIFY, UNOTIFY- This is the
                same as %::text, but surrounded with parenthesis. If there was
                no message, this is blank- not "()". The format for this can
                be changed by a script- see ParenText, chapter 6.

%::nick         Nickname of user triggering event. In cases such as you
                sending a private message, this is who you sent it to.
               
%::address      Address in ident@host format of %::nick, if available.
%::chan         Channel event occured in.
%::cmode        Current mode of %::nick on %::chan, such as @ or +.
%::cnick        Current color of %::nick on %::chan, as a number.

%::target       Equivalent to $target, useful for op notices and certain
                other cases.

%::knick        For KICK, KICKSELF- Nickname of user who was kicked.

%::kaddress     For KICK, KICKSELF- Address in ident@host format of %::knick,
                if available.
                
%::newnick      For NICK, NICKSELF- New nickname for user.

%::modes        For MODE, USERMODE- Channel modes or usermodes being set.
                
%::ctcp         For CTCP, CTCPSELF, CTCPREPLY, CTCPREPLYSELF- CTCP or
                CTCPREPLYcommand. (single word) The remainder of the CTCP, if
                any, is in %::text.

Variables used in raws:

(Note that if a raw only uses ONE of %::value, %::nick, or %::chan, then the script is allowed to place the SAME VALUE in all three, for simplicity. A theme should not rely on this behavior.)

%::text         The full text from the event, either $2- or $3-. (if $2
                is placed in %::nick or %::chan, %::text should be $3-)

%::numeric      Number of the raw reply being triggered.
%::value        A single value of interest from a raw, usually $2.
%::nick         Nickname raw applies to. (usually from $2)
%::chan         Channel raw applies to. (usually from $2)

%::fromserver   The server that is sending the raw line to the user- this
                is determined using $nick in a mIRC raw event. This will
                NOT always match %::server.

%::users        For RAW.251, RAW.255, RAW.265, RAW.266- User count.
%::modes        For RAW.221, RAW.324- Channel/user modes currently set.
%::address      For RAW.302, RAW.352- Address of nickname. (USERHOST or WHO)

Variables for WHOIS, WHOWAS, and WHO events and raws:

(Note that there is no WHO event, just RAW.352, but it is listed as WHO below for clarity. A script is only required to use these variables in WHOIS/WHOWAS/WHO events and raws- they do not need to work in other events and raws.)

%::away         WHOIS- Away message, if any.
                WHO- H for Here, G for Gone. (away)
                
%::nick         WHOIS, WHOWAS, WHO- Nickname of user.
%::address      WHOIS, WHOWAS, WHO- Address of user in ident@host format.

%::chan         WHOIS, WHOWAS- Channels user is on, if any.
                WHO- A single channel user is on.

%::cmode        WHO- Current mode of user on specified channel.
%::realname     WHOIS, WHOWAS, WHO- The "full name" field.
%::isoper       WHOIS, WHO- Is this user an IRCop? Set to "is" or "is not".

%::operline     WHOIS- The text of the "is an ircop" line sent by the server,
                not including the nickname, as different users may have
                different levels of status described in this line.

%::isregd       WHOIS- Is this nickname registered? Set to "is" or "is not".
%::wserver      WHOIS, WHOWAS, WHO- IRC server the user is on.

%::serverinfo   WHOIS, WHOWAS- "Info" about the IRC server the user is on.
                (usually just useless text)

%::idletime     WHOIS- How long the user has been idle, in seconds.
%::signontime   WHOIS- When the user signed on, in $asctime() format.
%::value        WHO- Number of hops user is away.

%::text         WHOIS, WHOWAS- Any extra notes from a whois not covered
                elsewhere.
                WHO- Entire /who line.

Variables for DNS events:

(Other than %::nick, a script is only required to use these variables in DNS events- they do not need to work in other events and raws.)

%::nick         Nickname of user being DNS'd, if appropriate.

%::address      The address being looked up. This will be equal to either
                %::naddress or %::iaddress. (not %::nick)

%::naddress     Named address, if available.
%::iaddress     IP address, if available.
%::raddress     Resolved address, if available.

List of all variables without duplicates-

%:echo      %:comments

%::address  %::fromserver  %::newnick    %::serverinfo
%::away     %::iaddress    %::nick       %::signontime
%::c1       %::idletime    %::numeric    %::target
%::c2       %::isoper      %::operline   %::text
%::c3       %::isregd      %::port       %::users
%::c4       %::kaddress    %::parentext  %::value
%::chan     %::knick       %::pre        %::wserver
%::cmode    %::me          %::raddress
%::cnick    %::modes       %::realname
%::ctcp     %::naddress    %::server

contents

CHAPTER 4 - MTS FILE FORMAT - SETTINGS AND INFORMATION

.MTS files contain more than just events and raws- they contain other lines with information and settings. These settings are covered in this chapter. Remember that all entries in an .MTS file take up one line. Actual events and raws are in the next chapter. Also note that the setting names are not case sensitive.

Note that MTSVERSION and NAME are the ONLY required fields. The [mts] line is also required. Everything else is optional, and a script should use default values or no values for missing items.

Informational items in an MTS file:

[mts]           This must appear before any MTS data. It should appear on
                a line by itself. (this is to ease MTS loading by allowing
                use of the mIRC /loadbuf -t switch.)
                
Name            This is the name of the theme, and is required.
Author          The name or nickname of the theme's author.
Email           E-mail address of the author.
Website         Website for the theme or author.
Description     A brief description of the theme.

Version         The version of the theme. A new version of the same theme
                should have a value that is greater than (>) the previous
                version's value.

MTSVersion      The version of MTS the theme is designed for. A theme will
                work on a later version of MTS but not an earlier one. This
                field is required and should be in the form "n.nn".

Color options in an MTS file:

These items allow a theme to change mIRC and theme colors.

Colors        These are the mIRC /color settings to use; the order is the
              same as in the mirc.ini file. The format is 26 numbers,
              separated by commas. If not present, use the default mIRC
              colors. See chapter 9 for the order of colors and defaults.
              
RGBColors     These are the RGB values to use for all 16 colors. Each color
              is three numbers (R,G,B) separated by commas; there are 16
              such sets, separated by spaces. In other words, R,G,B R,G,B
              R,G,B etc. (where R,G,B are numbers) If this line is not
              present, you should reset all colors to their default mIRC
              RGB values (can be done with /color -r in mIRC)
              
BaseColors    This is four colors used in the theme itself. These will be
              used for %::c1 through %::c4 and <c1> through <c4>. The
              format is four numbers, separated by commas. It is recommended
              that these four colors be in a certain order. (see below)

BaseColors help keep a theme "modular"- if you use them throughout a theme, you can then change the colors of your entire theme just by changing one or two color lines. (more details in chapter 9 - schemes)

Scripts may also choose to use the colors in BaseColors for their own specialized echos and displays. For that reason, the order of the four BaseColors is recommended to be as close to the following as possible-

Text color, Nickname color, Text highlight color, Bracket color

These are merely recommendations- a theme can use these for anything it wishes. The reason for the recommendation is so a theme contains reasonable colors that a script can use for it's own purposes as well. All four colors should ideally produce readable text on the selected background color.

Nicklist options in an MTS file:

The first set of items are single numbers representing the color to use for nicknames in the nicklist. Each line either corresponds to a channel mode (OP, etc.) or a special status. (such as IRCOP) Not all scripts will use all colors (or even use nicklist colors at all) and remember that themes do not need to include all colors. A script should ideally not use any colors that are not present- in other words, if a user is both an OP and an IRCOP, but the theme does not define an IRCOP color, use the OP color.

CLineOwner     Mode . on certain servers (channel owner)
CLineOP        Mode @ (op)
CLineHOP       Mode % on some servers (half-op or helper)
CLineVoice     Mode + (voice)
CLineRegular   No special mode.
CLineMe        Your nickname.
CLineFriend    A friend. (notify list, userlist, protected, auto-op, etc.)
CLineEnemy     An enemy. (banned, ignored, blacklisted, etc.)
CLineIrcOP     IRCops.

For scripts that can use /aline for custom windows (such as multiserver scripts), MTS provides for you to be able to change the mode character and color for each type of user. Keep in mind that CLineCharRegular probably wont use a character, but if the theme wants one, then you should accomodate for it. The syntax is the exact color and mode character to be prefixed before the above CLine colors. Note that, like the other CLine lines, you should not include the color control code itself. (Ctrl+K)

CLineCharOwner     12.
CLineCharOP        11@
CLineCharHOP       10%
CLineCharVoice     09+
CLineCharRegular

Font options in an MTS file:

These options define the fonts to use for windows. A script may ignore these but the theme may not look correct. Some fonts apply to multiple windows or types of windows. Each font line is a font name, followed by a comma and a font size. The size should be a positive or negative number. To make a font bold, put ,B after the font size.

FontDefault    Font used for status window and any unspecified windows. This
               is basically a "default" font that can be used for any window.
               (for example, script windows or notify/url/finger windows)
               
FontChan       Font for channel windows.
FontQuery      Font for query, chat, and dedicated message windows.

Image options in an MTS file:

These options define image files to use for backgrounds and other areas of mIRC. A script is free to ignore some or all of these. The first word of each line defines the way to apply the background- center, fill, normal, stretch, tile, or photo. This is followed by the filename of the image. The ImageButtons item does not have a style. The ImageToolbar and ImageSwitchbar should include a style. (although mIRC currently only supports the fill style for these, this may change in the future.)

ImageStatus    Background for status window.
               (you may use this for other windows if desired)
               
ImageChan      Background for channel windows.
ImageQuery     Background for query, chat, and dedicated message windows.
ImageMirc      Background for main mIRC window.

ImageToolbar   Image to use for toolbar.
ImageButtons   Image to use for toolbar buttons.
ImageSwitchbar Image to use for switchbar.

Miscellaneous options in an MTS file:

Prefix          This value is simply used for %::pre and <pre>, so that a
                common prefix does not need to be rewritten on every event.
                
ParenText       This special value is used to surround part, quit, and kick
                messages with parenthesis. If not present, a script should
                use "(<text>)" for this. Whenever a part, quit, or kick
                occurs, <text> will contain the normal text, and <parentext>
                will use this. However, <parentext> will be blank if there
                is no message. This usage prevents events from showing empty
                parenthesis if there is no message.
                
Timestamp       Set to ON or OFF. Can be removed from a theme file so as
                to not affect the timestamp setting, or a script can
                ignore this setting in a theme.

TimestampFormat mIRC's /timestamp format is set to this. Note that a script
                should reset this on startup, because if it contains colors
                then mIRC will remove them on startup.

                A themer can also use the special <timestamp> variable to
                put a timestamp anywhere in a line they want. The theme 
                engine should always set the %::timestamp variable when
                $theme.text is called.

Script          This item contains the filename of a mIRC script to load as
                part of the theme. This file should contain all aliases
                used in !Script lines. This file should be loaded using
                /load -rs, as it is a script file, not an alias file.

Scheme1         These lines contain names of color schemes that the theme
Scheme2         contains. See chapter 9 for details on this optional feature.
etc...

contents

CHAPTER 5 - MTS FILE FORMAT - EVENTS AND RAWS

All possible theme events, and all common raws, are listed below. A script is not required to use all events, but most should be used for full effect. Note that if an event or raw is missing, a script should use some sort of default display. A missing event or raw does NOT mean to hide that event or raw.

Whenever an event or raw refers to a variable in %::var format, remember that the same value will be in <var> format when processing normal theme lines. Note that only some %::vars are mentioned- others like %::nick are assumed.

Text IRC events:

TextChan         Standard text in a channel.
TextChanSelf     Your text in a channel.
ActionChan       Action performed in a channel.
ActionChanSelf   You perform an action in a channel.
                 
NoticeChan       You recieve a channel or op notice. Note that %::target
                 will contain @#channel for an op notice.
                 
Notice           You recieve a private notice.
NoticeSelf       You send a private notice.
NoticeSelfChan   You send a channel or op notice. The script should put
                 either #channel or @#channel into %::target to clarify.
                 
TextQuery        Private message in a query or chat window.
TextQuerySelf    You send a message in a query or chat window.
ActionQuery      Action performed in a query or chat window.
ActionQuerySelf  You perform an action in a query or chat window.

TextMsg          You recieve a private message, displayed in active or
                 dedicated messages window.
                 
TextMsgSelf      You send a private message, displayed in active or dedicated
                 messages window.

Basic IRC events:

Mode            Channel mode change. %::modes has full mode string.
ModeUser        You change usermodes. %::modes has full mode string.
Join            Another user joins a channel.
JoinSelf        You join a channel.

Part            Another user parts a channel. %::text has part message, if
                any. %::parentext will contain the message with parenthesis,
                if any. (See ParenText, Chapter 6)

Kick            Another user is kicked. %::text has kick message.

KickSelf        You are kicked. %::text has kick message. Both this and Kick
                should place the message, if any, into %::parentext with
                parenthesis. (See ParenText, Chapter 6)

Quit            A user quits IRC. %::text has quit message, if any. This event
                will be called once for each place it appears. (usually, once
                for each channel the user was in)  %::parentext will contain
                the message with parenthesis, if any. (See ParenText,
                Chapter 6)

Topic           Topic changed in a channel. %::text has new topic.

Nick            Your or another user changes nickname. This event will be
                called once for each place it appears. (usually, once for
                each channel the user was in)

NickSelf        This appears in status when you change nickname. The NICK
                event will be used for each channel, also.

Invite          You are invited to another channel.

ServerError     The server reports an error. This is equivalent to the ERROR
                event in mIRC. %::text has full error string.
                
Rejoin          You attempt to rejoin a channel.

Ctcp            You recieve a CTCP. %::ctcp contains the CTCP command (one
                word) and %::text contains any additional CTCP text.
                
CtcpChan        You recieve a CTCP on a channel. %::ctcp contains the CTCP
                command (one word) and %::text contains any additional CTCP
                text. %::chan will contain the channel it was received on.
                
CtcpSelf        You send a CTCP. %::nick will contain whom it was sent to. 
                %::ctcp and %::text work like CTCP.
                
CtcpChanSelf    You send a CTCP to a chan. %::chan will contain where it was 
                sent to. %::ctcp and %::text work like CTCP.
                
CtcpReply       You recieve a CTCP reply. %::ctcp contains the CTCP reply (one
                word) and %::text contains any additional reply text. %::chan
                will contain the channel it was received on, if any.
                
CtcpReplySelf   You send a CTCP reply. Not all scripts use this when sending
                replies. %::chan or %::nick (but not both) will contain whom
                it was sent to. %::ctcp and %::text work like CTCPREPLY.
                
Notify          A user on your notify list is on IRC. %::text contains any
                notify note.
                
UNotify         A user on your notify list has left IRC. %::text contains any
                notify note.
                
Wallop          A wallop, contained in %::text.

NoticeServer    A server notice, contained in %::text. %::nick will contain
                the server that sent the notice, which may differ from
                %::server.

Non-IRC events:

These events are not directly related to an IRC connection.

DNS             Displayed when you start a /dns request. Either %::nick or
                %::address (but not both) will contain what you are
                /dns'ing, as appropriate.
                
DNSError        A /dns request has failed. One of the following will be true-
                
                1) Only %::nick is filled. You tried to /dns a user that was
                   not found.
                2) Only %::address is filled. You tried to /dns an address and
                   failed.
                3) Both are filled. You tried to /dns a user and failed, but
                   the user was online.
                
                If %::address is filled, either %::iaddress or %::naddress
                will also be filled, but this isn't usually used.
                
DNSResolve      A /dns request has been resolved. %::nick will contain a
                nickname if appropriate. %::address, %::naddress,
                %::iaddress, and %::raddress will all be filled.
                
Echo            Used for anything a script wants to display. %::text contains
                the actual text to display.
                
EchoTarget      Used for anything related to or displayed in a channel.
                %::target contains the target window name, %::text contains
                the actual text.
                
Error           Used for any error messages a script displays. %::text
                contains the text to display.
                
Load            Displayed (or run) when the theme is loaded. (after any script
                is loaded and any settings changed.)
                
Unload          Displayed (or run) right before the theme is unloaded.

Whois and Whowas raws and events:

/whois (and /whowas) replies are handled a little differently in MTS. Each raw is called normally as expected- and if this is enough for a script (displaying the /whois line-by-line) then nothing more is needed. Some themes, however, like to wait until the entire whois reply is collected and then display it, for formatting purposes. In this case, leave the /whois raws blank, and add Whois and Whowas events. These will be called after the data for a full /whois or /whowas is collected. Since a /whois may reply on multiple nicknames, this event will either be called right before the end of whois raw (RAW.318) or right before the start of the next whois. (RAW.311) Most themes will use either the line-by-line raw method, or the Whois method- but a theme is allowed to use both if it needs to for any reason.

If a theme does not have a Whois or Whowas event, then a script should use default /whois or /whowas behavior if the raws are also not present. Otherwise, hide output even if a specific /whois or /whowas raw is not found.

Note that any unrecognized raws seen between RAW.311 and RAW.318 should be treated as part of a /whois, and stored in or appended to %::text. This isn't a requirement, but suggested for ideal /whois operation. (if not done, %::text will be blank in the WHOIS or WHOWAS event.)

RAW.311         Start of whois- %::nick, %::address, %::realname.
RAW.314         Start of whowas- %::nick, %::address, %::realname.

RAW.319         Channels- %::chan. This raw may occasionally appear multiple
                times per nick. %::chan will contain -all- channels in the
                final WHOIS event.
                
RAW.312         Server- %::wserver, %::serverinfo. (in a whowas, %::serverinfo
                often contains signoff time)
                
RAW.301         Away- %::text.
RAW.307         Registered nick- %::isregd.
RAW.313         IRCop- %::isoper, %::operline.
RAW.317         Idle/signon- %::idletime, %::signontime.

RAW.318         End of whois- %::nick will contain the nickname or nickname(s)
                that were /whois'ed.
                
RAW.369         End of whowas- %::nick will contain the nickname or
                nickname(s) that were /whowas'ed.
                
Whois           Display whois- Called right before 318. (or 311 in a
                multi-user whois)
                
Whowas          Display whowas- Called right before 369. (or 314 in a
                multi-user whowas)

THIS IS NOT A COMPREHENSIVE LIST OF RAWS. ANY raw can be listed in a theme.

Simply use RAW.nnn, where nnn is the three digit raw number. If a raw is not found, RAW.OTHER should be used, if present. If not, the script can display the raw however it pleases. If you wish to hide the output from a raw, you should just write "!Script" for the event, with nothing to run. This will essentially "do nothing".

Any raw not listed here should have $2 in %::nick and %::chan, $3 in %::value, and $3- in %::text if $2 is a nickname or channel, or $2 in %::value and $2- in %::text otherwise.

Note that if a raw only uses ONE of %::value, %::nick, or %::chan, then the script is allowed to place the SAME VALUE in all three, for simplicity. A theme should not rely on this behavior.

RAW.001         Welcome to IRC.

RAW.002         Server and version- %::server (this is always set anyways) and
                %::value.

RAW.003         Server created on- %::value.
RAW.005         Protocols supported by server- %::text.
RAW.221         Current usermode- %::nick, %::modes.
RAW.250         Total connections- %::value.
RAW.251         Users, invisible, servers- %::users, %::text, %::value.
RAW.252         Operators- %::value.
RAW.253         Unknown connections- %::value.
RAW.254         Number of channels- %::value.
RAW.255         Local clients, servers- %::users, %::value.
RAW.265         Local users, max- %::users, %::value.
RAW.266         Global users, max- %::users, %::value.

RAW.302         Userhost- %::nick, %::address, %::value. Called once for each
                user in the userhost. (value contains + for here, - for away,
                and also contains a * for an ircop.)
                
RAW.315         End of /who- %::value contains exactly what was /who'd.
RAW.324         Channel modes- %::chan, %::modes.
RAW.332         Channel topic- %::chan, %::text.
RAW.333         Topic set by and when- %::chan, %::nick, %::text.
RAW.341         User was invited- %::nick, %::chan.

RAW.352         /who data- %::nick, %::address, %::cmode, %::away, %::chan,
                %::wserver, %::realname, %::value, %::text, %::isoper
                
                (nick, address, cmode, chan, wserver, realname, and isoper are
                 exactly like a /whois. away is H for here and G for gone.
                 value is number of hops. text is the entire line, so the
                 script can parse it manually if desired.)
                 
RAW.353         Channel names list- %::chan, %::text.
RAW.366         End of names list- %::chan.
RAW.372         Message of the day- %::text.
RAW.375         Begin message of the day.
RAW.376         End message of the day.
RAW.391         Time/date at server- %::text.
RAW.401         No such nickname- %::nick.
RAW.403         No such channel- %::chan.
RAW.404         Unable to send message- %::chan.
RAW.421         Invalid command- %::value.
RAW.433         Nickname in use- %::nick.
RAW.471         Channel full- %::chan.
RAW.473         Channel invite only- %::chan.
RAW.474         Banned from channel- %::chan.
RAW.475         Channel key required- %::chan.
RAW.482         Not opped- %::chan.

RAW.Other       Used for any raw not found in the theme.

contents

CHAPTER 6 - MTS FILE FORMAT - SOUNDS (OPTIONAL)

This chapter describes a method of adding sound events to a theme. Sounds can be defined for events by simply making another line in the theme in the form of:

SndEventName filename.wav

"EventName" should match a MTS event or a mIRC event or command, if possible. An event that matches an IRC event affecting you should include the "Self" suffix. Some more commonly used sound events-

SndNotice
SndJoin
SndJoinSelf
SndPart
SndPartSelf
SndKickSelf
SndOpSelf
SndDeopSelf
SndBanSelf
SndInvite
SndNotify
SndUNotify
SndError
SndStart
SndConnect
SndDisconnect
SndOpen
SndDCC
SndDialog
SndAway
SndBack
SndPager

contents

CHAPTER 7 - MTS FILE FORMAT - SCHEMES (OPTIONAL)

This chapter describes a method of supporting multiple color sets in a theme, hereafter referred to as "schemes". Support for this in a script is entirely optional. Themes do not need to contain any schemes.

The concept of schemes is to allow a theme to have a few things that change for each scheme, and let the rest remain the same across all schemes. Usually, the items changing will be Colors, RGBColors, and similar items, but this is not required. For example, a theme could contain a "red" scheme, a "blue" scheme, and a "green" scheme, which would contain different Colors lines; however, everything else would remain the same.

Schemes prevent having to create entire new themes just to change minor things such as colors.

For each scheme included in a theme, you need to add a SchemeN line to the main theme section, containing a description or name for that scheme. Then, add a [schemeN] section to the theme containing all items that are changing in that scheme. Here is a short example-

[mts]
Name This is an example theme.
MTSVersion 0.97

; (normal theme lines would go here)

; We include a default colors line for scripts that
; don't support schemes.
Colors 1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8,1,2

; These are our schemes
Scheme1 Red
Scheme2 Green

[scheme1]
; Colors for the 'Red' scheme
Colors 8,7,6,5,4,3,2,1,8,7,6,5,4,3,2,1,8,7,6,5,4,3,2,1,8,7

[scheme2]
; Colors for the 'Green' scheme
Colors 9,1,6,5,4,7,3,2,3,5,1,3,5,9,3,8,4,5,2,7,3,2,4,1,0,5

; We also change the prefix for this scheme
Prefix [*]

; (end of file)

When a script (that supported schemes) were to load this theme, it would first load everything in the [mts] section. Then, it would grab all of the scheme names from the SchemeN lines, and prompt the user for the scheme to load. Then, it would load the associated [schemeN] section, overriding anything in the original theme.

Note how the theme includes a Colors line in the main section. This is so that a script that doesn't support schemes will still load the theme properly.

contents

CHAPTER 8 - THEMING NOTES

Order of items in a Colors line-

Background, Action text, CTCP text, Highlight text, Info text, Info2 text, Invite text, Join text, Kick text, Mode text, Nick text, Normal text, Notice text, Notify text, Other text, Own text, Part text, Quit text, Topic text, Wallops text, Whois text, Editbox, Editbox text, Listbox, Listbox text, Grayed text

Default mIRC colors for a Colors line-

0,6,4,5,2,3,3,3,3,3,3,1,5,7,6,1,3,2,3,5,1,0,1,0,1,15

Default mIRC RGB values for an RGBColors line-

255,255,255 0,0,0 0,0,128 0,144,0 255,0,0 128,0,0 160,0,160 255,128,0 255,255,0 0,255,0 0,144,144 0,255,255 0,0,255 255,0,255 128,128,128 208,208,208

Important notes for theme files-

  1. A theme alias should never use /halt. Use /return instead.

  2. A theme alias should never modify (or unset) %::variables.

  3. A theme file should not contain the mIRC ON LOAD and ON UNLOAD events. Use the MTS LOAD and UNLOAD events instead.

  4. A theme that contains schemes should still include all settings (that it uses) in the main [mts] section, in case a script that doesn't support schemes tries to load it.

  5. Remember to begin your theme with the [mts] line. This is required so that scripts can ease theme (and scheme) loading. (even if your theme or script does not support schemes, all themes must still use this line for compatibility.)

  6. Do not worry about %:comments for normal text lines, but when you !Script an event, you should display it. This doesn't apply to raws.

  7. Color codes should ALWAYS BE DOUBLE DIGIT. Although, most people still aren't used to doing this, so a theme engine should IDEALLY try and compensate for a theme that doesn't have double digit color codes and adjust accordingly.

  8. !Script can not be used on ParenText, Prefix, or Timestamp (doesn't make sense to do this)

  9. Themes should NOT USE /echo. They should only use %:echo.

  10. <variables> are not to be used on !Script lines - use the correct %::variable instead.

  11. An item in a theme file with no value, such as TextChan by itself, should do nothing. This especially applies to schemes - a scheme should have the capability to override (or remove) a setting in the main theme.

contents

Clone this wiki locally