Introduction
Welcome to mIRC, an Internet Relay Chat Client.
mIRC attempts to provide a user-friendly interface for use with the Internet Relay Chat network. The IRC network is a virtual meeting place where people from all over the world can meet and talk.
To IRC all you need to do is Connect to a server, Join a channel, and Chat!
mIRC will guide you through these initial stages and hopefully you'll be chatting in no time. If you get stuck or want to find out more about a certain feature, just click on a Help button eg. in the Options dialog, and you should find some hints there to help you.
As you become more experienced you can also start configuring mIRC's features to suit your own needs and tastes, features such as colours, fonts, function keys, aliases, popup menus, scripts, sounds and many others.
The first few sections of this help file are highly recommended reading as they provide a quick introduction to all of the basic aspects of IRC, which will help you get started.
Please also remember to visit the mIRC website at http://www.mirc.com
regularly for the latest information on mIRC.
Connecting to a Server
Connecting to an IRC server is the first step to chatting on IRC and is done through the Connect dialog, which pops up automatically when you first run mIRC.
Once you enter a few basic pieces of information about yourself, you can select an IRC Server from the servers list and then click on the Connect button. You'll know you've connected when the IRC server shows you it's Message Of The Day, which contains information about that server. At that point you'll be able to Join a channel to start chatting.
Basic information
The following information is required before
you can connect to a server.
Full Name
You can enter your real name here, however note
that whatever you enter can be seen by other people on IRC. Most people
usually enter a witty one-liner or comment.
Email Address
You must enter a full email address eg. [email protected].
Nickname and Alternative
Your nickname is the name by which people will
know you on IRC. Remember that there are many hundreds of thousands of
people on IRC, so it's possible that someone might already be using the
nickname you've chosen. If that's the case, you should try to pick a different,
more unique, nickname. You can enter an alternative nickname as well in
case someone is using your first nickname. If both nicknames are in use,
mIRC inserts "/nick" into the edit box so that all you have to do is enter
a new nickname and press enter.
Invisible Mode
If you turn on the invisible mode switch, people
will not be able to find you on IRC unless they already know your nickname,
or if you join a channel or talk to them privately.
IRC Servers
The IRC server that you choose is the most important
factor in determining how quickly and easily you connect, so if it's taking
a long time to connect to one IRC Server, choose a different one and try
connecting again.
Note: If you're having problems connecting to an IRC Server, see the Connection Problems section.
You can manage your list of IRC servers by using the add, edit, and delete buttons. Each IRC server consists of the following information:
Description
This can be any text you want and serves only
as a description.
Address
This is the IRC server address eg. irc.dal.net
Port Number
This is usually 6667. If the server allows connections
on different ports, you can enter them all separated by commas eg. 6667,6668,6669
and mIRC will pick one randomly each time it connects to the server.
Group Name
This allows you to group servers together when
they are sorted with the Sort button.
Password
This is rarely required, so you should not have
to enter anything here unless you have been specifically told to do so.
Hint: If you click your right mouse button on the Options toolbar button, a popup menu appears that allows you to quickly connect to an IRC server.
Joining a Channel
Once you've connected to an IRC Server, you can join a channel to talk to other people. There are several ways to join a channel, each is explained below.
The Channels Folder
The easiest way to join a channel is to use the
channels folder which holds a list of your favourite channels. mIRC automatically
pops up this folder the moment you connect to an IRC Server. You can join
one of the listed channels by selecting it and clicking the Join button.
You can also view the channels folder by clicking on the Channels Folder button in the toolbar.
The Channels List
Another way to join a channel is to retrieve
the list of currently active channels by using the List Channels dialog.
You can view the List Channels dialog by clicking on the List Channels
button in the toolbar.
To retrieve the entire channels list, you can click on the Get List button. The list can be quite long, often thousands of channels, so it can take several minutes to retrieve it. mIRC will save this list once you have retrieved it, so if you wish to view it again later you can just click on the Apply button. However, if you want an updated list you will need to retrieve it again.
If you click your right mouse button in the channels list window, a popup menu with various options will appear.
Note: You can also specify a filename for the channels list which can be useful if you regularly visit different IRC networks.
The /join Command
The format of the /join command, which is an
IRC Command, is /join #channel where #channel is the name of the channel
you want to join. So if you wanted to join channel #mIRC, you would type
/join #mIRC and press enter, and a moment later the #mIRC window will open
indicating that you have joined it.
Creating a new channel
You can create a new channel if it doesn't already
exist just by joining it. So, let's say you want to create a channel called
#bubbles, you would just type /join #bubbles, and if it doesn't exist it
will be created for you. If it does exist, you will just join it as usual.
Talking on a channel
You can talk to other people by typing in a message
and pressing the enter key. Your message will be sent to the channel and
everyone on the channel will see it. A good first message is just to say
hello with a smiley face :)
The listbox on the side of the channel window lists all of the people who are currently on that channel. If you click your right mouse button in the listbox, a popup menu with various options will appear.
Popup menus are actually used everywhere in mIRC, you can even click your right mouse button in the status window, or in the channel window itself, and a different popup menu will appear. These popup menus are configurable, you can change them in the Popups dialog to perform whatever functions you require.
Leaving a channel
You can leave a channel by clicking it's window's close button, or you can use the /part command, which is another IRC command similar to /join. The format of the /part command is /part #channel where #channel is the name of the channel you want to leave. If you type /part without a channel name and press enter, you will part the current channel.
Hint: you can click the top left corner button/icon
in any window in mIRC to view the System menu which contains useful features.
Chatting Privately
As well as being able to chat on public channels, mIRC also allows you to chat privately with someone.
If you're on a channel, and you see someone you'd like to chat with, you can double-click on their nickname in the nickname listbox and a private query window will open up. You can then start chatting privately to them through the query window. Alternatively, you can click your right mouse button in the nickname listbox and a popup menu will appear with various options, one of which will be to open a private query window to the person selected in the nickname listbox.
If you're not on a channel, you can type the command /query nickname, where nickname is the person you want to chat with. Press the enter key, and a query window will open up and you can start chatting privately, assuming of course that the person is on IRC. You can find out if a person is on IRC by using the /whois nickname command.
There is another way to chat privately called DCC Chat. This method is more secure and usually faster because it doesn't rely on the IRC Server to relay your messages. Instead it connects directly to the other person's IRC Client. However it does need to use the IRC Server to initiate the chat session.
To DCC Chat someone, you can click on the Chat button in the toolbar, and a DCC Chat dialog will pop up. Enter the person's nickname, and click on the Chat button, and if the person accepts your DCC Chat request, you will be able to start talking to them privately.
If a user sends you a chat request, a chat dialog will pop up asking you whether you want to accept their chat request. You can then accept or decline. You can find out more about DCC Chat related settings in the DCC Section.
The /dcc chat <nickname> command is another way of initiating a dcc chat, where nickname is the user you with whom want to dcc chat.
Note: DCC Chat needs to use your IP address to initiate a connection
with another client. If you are having trouble initiating a connection
then your IP address might be wrong. See the Local Info section for more
information.
Sending & Receiving files
The ability to Send and Receive files is one of the most useful features of mIRC since it allows you to share all kinds of information with other people on IRC.
Warning: If you've never shared files before, please read the Accepting Files on IRC section so as to be aware of the dangers of accepting files from others before you start.
On IRC, a method called DCC Send and DCC Get is used to connect directly to another IRC client to Send and Get files, instead of going through the IRC network. The IRC network is used only to initiate the DCC Send request.
DCC Send
DCC Send allows you to send a file to another user. You can do this
by clicking on the DCC Send toolbar button to open the DCC Send dialog.
You can then enter the nickname of the user, select the file you want to
send, and click on the Send button.
mIRC will then tell the user that you want to send them a file. The user then has to accept your send request, at which point the file transfer will begin.
Packet Size
The packet size is the number of bytes that mIRC will send to another
client in one packet. The minimum is 512, the maximum is 8192.
If you check minimize then the dcc send window(s) will be minimized automatically.
Fill Spaces
The fill spaces option is only available in the 32bit version and only
under operating systems that allow spaces in filenames. It is highly recommended
that you leave this option turned on. For more information read this.
Fast Send
Turning on this option should speed up your DCC sessions. You can also
change this setting with the /fsend [on|off] command.
Note: DCC Send needs to use your IP address to initiate a connection with another client. If you are having trouble initiating a connection then your IP address might be wrong. See the Local Info section for more information.
DCC Get
Whenever someone tries to DCC Send a file to you, mIRC pops up the
DCC Get and asks you if you want to accept the file. If you choose to accept
the file, mIRC will ask the sender to begin the file transfer, at which
point you should begin receiving the file.
DCC Resume
This feature allows you to resume DCC transfers that failed to complete.
If a user tries to send you a file that already exists in your get directory then you will be shown a warning that the file exists. You then have the option to either overwrite, resume, or rename the file.
If you select overwrite then the whole file will be downloaded from the beginning and any existing file of the same name will be erased.
If you select resume then mIRC will attempt to negotiate a transfer resume to get the remaining part of the file. It will append this to the portion of the file you already have.
The mIRC DCC Resume Protocol is described here if you need to know how it works.
DCC Options
You can also find other DCC related settings in the DCC dialog which
can affect how file transfers behave.
The /dcc send command
The /dcc send command can also be used to initiate a DCC Send to the
specified nickname. The format of the command is:
/dcc send -c <nick> <file1> [file2] ... [fileN]
If you specify more than one filename, multiple dcc send sessions to the specified user are initiated.
If you specify a wildcard filename, then the DCC Send dialog will display files matching the wildcard.
The -c switch makes the dcc window close automatically once the transfer has finished.
Note: If you want to connect to someone else's DCC Server you can specify
an IP Address and port instead of the nickname, eg. /dcc send ipaddress:port
<file1> ...
Changing Colours
mIRC uses black text on a white background by default because this allows coloured text to appear clearly and crisply. However, if you find the colour scheme too bright, or if you want something a bit more fun, you can change the text and background, as well as other specific types of text eg. your own messages, to other colours.
To change the colour settings, select the Colours dialog from the Tools Menu. It will popup up and show you the different types of messages in their current colour settings.
To change the colour of an item, just click on it and you'll see it's name appear in the listbox at the bottom. Then click on any of the coloured squares, and you'll see the colour of the text for that item change accordingly.
To change the background colour, just click on the background itself and select a colour as usual. You can also click on the background of the editbox and the listbox to change their colours as well.
If you don't like the changes you've made you can either click cancel or you can click the reset button which will reset the colours back to the default mIRC colours.
To customize the colour of one of the colour boxes, just click your right mouse button on it and a custom colour dialog will pop up allowing you to choose a new colour for it.
Once you've finished making changes, click on the Ok button, and hey presto you should now feel a bit more colourful!
mIRC also allows you to interactively change the colour, as well as
the appearance, of text as you type. You can find out how to do this in
the Control Codes section. However remember that other people might have
a background colour that's different from yours, so what appears clearly
on your background colour might be hard to read on someone else's.
Basic IRC Commands
IRC commands allow you to perform specific functions on IRC, such as maintaining control of a channel and the users on it. The following list of Basic IRC commands should help you get started. There are also Other Commands you can look at later.
General Commands
/JOIN #channel
Join the specified channel.
example: /join #irchelp
This will make you join the #irchelp channel. Once on a channel, anything you type will be seen by all the users on this channel. The #irchelp channel is very useful, so say hello and then ask any questions you want. If the channel you specified doesn't exist, a channel with that name will be created for you.
Some channels may also have keys ie. a password, which you need to specify
when using the /join command.
example: /join #irchelp trout
This will make you join the #irchelp channel using "trout" as the password.
/PART #channel
Leave a channel.
example: /part #irchelp
/LIST [#channel] [-MIN #] [-MAX #]
Lists currently available channels. You can also
tell mIRC to show only channels with a minimum and a maximum number of
people. If you specify a #channel then mIRC will only list information
for that channel. If you specify wildcards, eg. *love* then mIRC will list
all channels that contain the word love in them.
example: /list
example: /list -min 5 -max 20
example: /list #mirc
example: /list *love*
/ME message
Tells the current channel or query about what you are
doing.
/MSG nickname message
Send a private message to this user without opening a
query window.
/QUERY nickname message
Open a query window to this user and send them a private
message.
/WHOIS nickname
Shows information about someone.
/NICK nickname
Changes your nickname to a new nickname.
/QUIT [reason]
This will disconnect you from IRC and will give the optional
message as the reason for your departure. (this message only appears to
people who are on the same channels as you).
example: /quit That's all folks!
/AWAY [away message]
Leave a message explaining that you are not currently
paying attention to IRC. Whenever someone sends you a MSG or
does a WHOIS on you, they automatically see whatever message
you set. Using AWAY with no parameters marks
you as no longer being away.
example: /away off to get something to eat, back in a moment!
/TOPIC #channel newtopic
Changes the topic for the channel.
example: /topic #friendly Oh what a beautiful day!
/INVITE nickname #channel
Invites another user to a channel.
Channel and User Commands
If you have Op status, the following commands give you control over
both a channel and the users on it.
/KICK #channel nickname
Kicks named user off a given channel.
example: /kick #gb Ed
/MODE #channel|nickname [[+|-]modechars [parameters]]
This is a powerful command that gives channel operators
control of a channel and the users on it.
Channel modes
------------------------
ModeChar Effects on channels
~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
b <person> ban somebody, <person> in "nick!user@host" form
i channel is invite-only
l <number> channel is limited, <number> users allowed max
m channel is moderated, (only chanops can talk)
n external /MSGs to channel are not allowed
o <nickname> makes <nickname> a channel operator
p channel is private
s channel is secret
t topic limited, only chanops may change it
k <key> set secret key for a channel
User modes
-------------------
ModeChar Effects on nicknames
~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
i makes you invisible to anybody that does
not know the exact spelling of your nickname
o IRC-operator status, can only be set
by IRC-ops with OPER
s receive server notices
v gives a user a voice on a moderated channel
Here a few examples of the MODE command:
To give someone Op status: /mode #channelname +o nickname
Giving someone Op status means giving them control over the channel and the users on it. Give this out sparingly and to people you trust.
To op several people: /mode #channelname +ooo nick1 nick2 nick3
To de-op someone: /mode #channelname -o nickname
To ban someone: /mode #channelname +b nickname (or user address)
example: /mode #animals +b Jiminy
example: /mode #tree +b [email protected]
To Unban someone: /mode #channelname -b nickname (or user address)
example: /mode #gb -b Ed
To Make a channel invite only: /mode #channelname +i
You must now invite a user for them to be able to join your channel.
There many more commands but this list should help you get started.
To learn more about IRC commands you should download an IRC FAQ.
mIRC Commands
The following commands are mostly unique to mIRC, though some are only modifications or extensions of standard IRC commands.
Note: To view the full list of commands see the Search dialog.
/ajinvite [on | off]
Turns auto-join on invite on or off.
/alias [filename] <aliasname> <commands>
Adds, removes, replaces aliases; it is limited to single line aliases
and will not affect mutiple line definitions.
/alias /moo /me moos!
This will add the /moo alias to the top of the aliases list. To remove an existing aliases:
/alias /moo
To add an alias to a specific alias file, you would use:
/alias moo.txt /moo /me moos!
If you don't specify a filename, it defaults to using the first filename in which the alias exists, or if it doesn't exist then it uses the first loaded aliases file.
/amsg <message>
This and the /ame command send the specifed message or action to all
channels which you are currently on.
/background [-aemsgdluhcfnrtpx] [window] [filename]
Changes the background picture setting for a window. This can also
be changed via a windows System Menu.
-a = active window
-m = main mIRC window
-s = status window
-g = finger window
-d = single message window
-e = set as default
-cfnrtp = center, fill, normal, stretch, tile, photo
-l = toolbar
-u = toolbar buttons
-h = switchbar
You can right-click in the toolbar/switchbar to pop up a menu for changing these settings. Toolbar buttons can use RGB Colour 255,0,255 for transparency, the BMP must be of the same form as that in mIRC resources. It should be a 16 or 256 colour BMP.
-x = no background picture
Note: The window name should only be specified if none of the window switches are specified. The filename does not need to be specified if you are only changing the display method.
/ban [-ruN] [#channel] <nickname|address> [type]
Bans someone from the current channel using their address. To do this,
it first does a /userhost on the user, which gives it the user's address,
and then it does a /mode # +b <user address>.
If you specify the -uN option then mIRC pauses N seconds before removing the ban.
If you specify the -r switch then /ban removes the ban of the specified type for that nickname, eg. /ban -r nick 2
If you do not specify a ban type, then mIRC uses the whole nick!*[email protected] to do the ban. If you are banning an IP address then a wild card replaces the last number of the IP address. If you are on the channel then the #channel specification is not necessary.
If you specify a wildcard address it is used as-is, if you specify a full address then the type mask is applied to it.
For a list of ban types see the $mask identifier.
Note: This command uses the Internal Address List maintained by mIRC.
/beep <number> <delay>
Beeps a number of times with a delay.
/channel
Pops up the channel central window (only works in a channel)
/clear [-sghlc] [windowname]
Clears the buffer of the current window. If you specify a window name,
that window's buffer will be cleared.
The -s switch clears the status window.
The -g switch clears the finger window.
The -l switch clears the side-listbox in a custom window.
The -c switch clears the click history in a picture window.
The -h switch clears the editbox command history for a window.
You can use /clearall to clear the buffers of all windows.
/clipboard [-a] <text>
Copies the specified text to the clipboard. The -a switch makes it
append the text to any existing text in the clipboard.
/close [-icfgms@] [nick1] ... [nickN]
Closes all windows of the specified type and the specified nicknames.
If no nicknames are given, all windows of the specified type are closed.
The type of window is denoted by c for chat, f for fserve, g for get, i
for inactive dcc windows, m for message (query), s for send, and @ for
custom windows.
You can also specify the Nth window for -cfgs by appending a number, eg. /close -s4 nick, would close the 4th open dcc send to nick.
/colour [-r] <name> <index>
Allows you to change the colour settings for items in the Colours dialog.
You can change the colour of a box in the colour dialog, you can use /colour <index> <rgb>.
You can also reset the Nth colour box to its default RGB value with /colour -r <N>.
/copy -ao <filename> <filename>
Copies a file to another filename or directory. You can also use wildcards
for the source filename, and a directory name for the destination. The
-o switch overwrites a file if it existss. The -a switch appends the first
file to the second one.
/creq [+m|-m] [ask | auto | ignore]
This is the command line equivalent of setting the DCC Chat request
radio buttons in the dcc options dialog (see /sreq below). The +m|-m switch
turns the minimize setting on|off.
/ctcpreply <nick> <ctcp> [message]
Sends a reply to a ctcp query.
/ctcpreply goat HELP no help available.
/describe <nick|channel> <message>
Sends an action to the specified nickname or channel, the same as the
/me command, except that /me is used while in a query or channel window
so you don't need to specify the target when using it.
/disconnect
Forces a disconnect from a server. This is different from the /quit
command which sends a quit message to the server and waits for the server
to disconnect you.
/dll <name.dll> <procname> [data]
This allows you to call routines in a DLL designed to work with mIRC.
/dns [-ch] [nick|address]
Resolves an address. If mIRC sees a "." in the name you specify it
assumes it's an address and tries to resolve it. Otherwise it assumes it's
a nickname and does a /userhost to find the users address and then resolves
it. If you give it an IP address, it looks up the host name.
You can queue multiple /dns requests, and you can view the current queue by using /dns with no parameters.
The -c switch clears all currently queued DNS requests, except for the one currently in progress.
The -h switch forces /dns to treat the parameter as a hostname.
Note: because of the way the DNS lookup works, any DNS related functions currently in progress eg. connecting to a server, must be resolved before subsequent requests. This means that if a prior DNS is having problems resolving, subsequent DNSs have to wait until it times out before they can be resolved.
/dqwindow [on|off|show|hide|min]
Manipulates the single message window.
/echo [colour] [-dehiNtsaqlbfn] [#channel|[=]nick] <text>
Prints text in the specified window using the specified colour (0 to
15).
/echo 3 #mIRC Testing
would print "Testing" in the colour green in channel window #mIRC, assuming it's already open.
If a channel/nickname isn't specified, the -s switch echos to the status window, the -d switch echos to the single message window, and the -a switch echos to the currently active window.
The -e switch encloses the line in line separators.
The -iN switch indents the wrapped line by N characters.
The -h switch forces lines to hard-wrap so resizing the window doesn't
change the line.
The -t switch prefixes the line with a timestamp if global time stamping
is on or timestamping is on for that window.
The -q switch makes it not display the text if called from an alias
using the . prefix.
The -l switch makes it apply the highlight settings to the line that's
displayed.
The -bf switches make it apply the beep/flash settings in the window
it is echoing to.
The -n switch prevents the echo from hiliting the window switchbar
icon.
Note: This text is only displayed in your own window, it isn't sent to the server so no one else can see it.
/editbox [-sap|[=]window] <text>
Fills the editbox of the current window with the specified text.
The -s switch specifies the Status window.
The -a switch specified the Active window.
The -p switch indicates that a space should be appended to text.
To specify a dcc chat window, prefix the nickname with an = equal sign.
/emailaddr <address>
Changes the email address in the Connect dialog.
/exit
Close down mIRC and exit.
/filter [-sgdfwxnpriocteub] [n-n2] [c s] <infile | dialog id> <outfile
| dialog id> <matchtext>
This command scans lines of text in a window or file and if any of
them contain matchtext, they are written out to another window or file
which you can then use.
The infile can be a filename or a window name (custom or normal). The outfile can be a filename or a custom window name. You should specify the -fw switches if the names are ambiguous eg.
/filter -ff in.txt out.txt *mirc*
This indicates that both are filenames, and:
/filter -wf #in.txt #out.txt *help*
indicates that the first is actually a window name, and the second is a filename.
The -x switch excludes matching lines.
The -n switch prefixes lines with a line number.
The -s switch makes the status window the infile.
The -g switch makes the finger window the infile.
The -d switch makes the single message window the infile.
The -p switch wraps the text output in a custom window.
The -r switch specifies the range of lines n to n2 for filtering.
The -b switch strips BURK codes when matching text.
The -i switch indicates that you have provided a [dialog id] custom
dialog control as the input.
The -o switch indicates that you have provided a [dialog id] custom
dialog control as the output.
The -c switch clears the output window/file before writing to it.
The -t switch sorts the output based on [c s], column C using character
S as the columns separator
The -e specifies a descending sort, and -u a numeric sort.
This command also fills the $filtered identifier with the number of matches found, if any.
Note: If the input and output are the same window/file, mIRC will process the request correctly.
/findtext -n <text>
This searches active window for the specified text (same as Control-F).
/flash [-wbrN] <text>
This flashes the mIRC window/icon with the specified text in the titlebar
but only if mIRC is not the active application.
The -b switch makes mIRC beep every second.
The -w switch makes mIRC play the Flash sound specified in the Event
Beeps section.
The -rN switch makes mIRC repeat the flash only N times.
/flushini <filename>
Flushes the specified INI file to the hard disk. INI files are cached
in memory, so you may want to do this to make sure that your INI is updated
properly.
/font [-asgbd|window] <fontsize> <fontname>
This allows you to change the font for the current window. If no parameters
are specified, the font dialog pops up, otherwise the specified parameters
are used. You can make the font bold by using the -b switch.
The -a switch applies the setting to the active window, -s to the status window, and -g to the finger window.
The -d switch makes the font the default for that type of window, eg. for all channels, or all chats.
Note: if you use a negative number for the font size, it will match the size of fonts in the font dialog.
/help [keyword]
Brings up the section in the mIRC help file which matches the specified
keyword.
/hop [-cn] [#channel] [message]
Parts the current channel and joins a new one. If no new channel is
specified, it parts and rejoins the current channel without closing the
window.
The -c switch cycles the specified channel by parting and rejoining it.
The -n switch minimizes the channel window.
/join [-inx] <#channel>
This is a standard IRC command for joining a channel.
The -i switch makes you join the channel to which you were last invited.
The -n and -x switches minimize/maximize the channel window when you join it.
/linesep [-s|window]
Prints the line separator selected in the Options dialog in the specified
window.
/links
Retrieves the servers to which your current server is linked.
/load <-a|-pscqnm|-ruvsN> <filename>
Loads the specified alias, popup, or script.
/load -a aliases.ini loads an aliases file
/load -pc status.ini loads a channel popup
/load -pn status.ini loads a nickname list popup
/load -ru users.ini loads a users file
/load -rv vars.ini loads a variables file
/load -rs script.ini loads a scripts file
If you try to load a file that is already loaded, it's contents are updated and it's position in the alias/script processing order is maintained.
You can also use the /reload command with the same parameters to reload a file without triggering the on start/load events in the script being loaded.
If you specify the N with /load -rsN, this loads/reloads the script into the Nth position in the script list.
Note: You can only load one section at a time.
/loadbuf [lines] [-prsglecoNt<topic>] <window | dialog id> <filename>
Loads the specified number of lines from the end of the file of filename
into the specified window.
/loadbuf 20 @test info.txt
This loads the last 20 lines of info.txt into custom window @test.
/loadbuf 10-40 @test info.txt
This loads lines 10 to 40 of info.txt into custom window @test.
The -p switch forces lines of text to wrap when added to the window.
The -r switch clears the contents of the output window.
The -s and -g switches apply the command to the status and finger windows
respectively.
The -l switch applies the command to the side-listbox in a custom window.
The -e switch evaluates variables and identifiers in the line being
read.
The -cN switch specifies the default colour for lines.
The -t switch loads the text under the [topic] section in an INI or plain text file.
The -o switch indicates that you have specified [dialog id] parameters instead of a window name in order to load text into a custom dialog control.
/localinfo -uh [host ip]
Looks up and sets your local info settings. The -u switch performs
a /userhost lookup, the -h switch does a normal lookup. If you wish, you
can also set the local info manually by specifying the host and ip values.
/log <on|off> <window> [-f filename]
Turns logging on and off for a window, if you specify a filename the
logs file dialog is not popped up.
/mdi -act
Allows you to arrange icons, and cascade/tile windows.
/mkdir <dirname>
Creates the specified directory.
/nick <nickname>
Change your nickname.
Note: you can use /anick to change your alternate nickname.
/omsg [#channel] <message>
This and the /onotice command sends the specified message to all channel
ops on a channel. You must be a channel operator to use these commands.
If the #channel isn't specified, then the current channel is used.
Commands P to Z
Aliases
mIRC allows you to create aliases and scripts to speed up your IRC session or to perform repetitive functions more easily. To create aliases you must know some IRC commands.
Aliases can be called from the command line, from other aliases, and from popup and remote scripts. An alias cannot call itself recursively mainly because this seems to cause more problems for users than it solves.
Examples
The following examples show you how to create aliases that perform
simple functions.
/gb /join #gb
If you now type /gb this is the same as typing /join #gb.
/j /join $1
We have now added a parameter string. If we type /j #gb this is the same as typing /join #gb. The $1 refers to the first parameter in the line that you supply.
/yell /me $2 $1
If you now type /yell There! Hello the action command will be /me Hello There! The number after $ specifies the number of the parameter in the string that you entered.
/jj /join $?
The question mark indicates that you should be asked to fill in this parameter. The parameter you supply will be inserted in the line at that point. So if you type /jj a dialog will pop up asking you for the channel you want to join. If you enter #gb then the final command will be /join #gb.
/jj /join #$1
the # sign indicates that the parameter you specify should be prefixed with a hash indicating that it is a channel.
/jj /join $?="Enter channel to join:"
This does the same thing but now the dialog will have the "Enter channel to join:" line displayed inside it.
/aw /away $?="Enter away message:" | /say $!
This is similar to the line above except for the addition of the $! parameter. This refers to the text you just typed into the parameter box. ie. the away message. This saves you having to type the same message twice.
/give /me gives $$1 a $$2
The double $$ means that this command will only be executed if a parameter is specified. If you specify only one parameter in the above command it will not be executed. You can also do $$?1 or $?1 which means try to fill this value with parameter one if it exists. If parameter one doesnt exist, ask for it. In the first case the parameter is necessary for the command to be executed, in the second case it isn't.
/slap /me slaps $1 around with $2-
The $2- indicates that everything following and including parameter 2 should be appended to the command line. if you type /slap Sheepy a large trout the final line will be /me slaps Sheepy around with a large trout.
You can also specify $2-5 which means use only parameters 2 to 5.
/laugh /me laughs at $1's joke
Anything appended to a $ parameter is appended to the final parameter. So if in the above example we type /laugh mimi the final command would be /me laughs at mimi's joke.
/silly /say Hel $+ lo th $+ ere $+ !
Parameters are normally separated by a space. To make mIRC combine parameters you can use the $+ identifier. The above line will say Hello there!.
/p /part #
The # sign refers to the channel you are currently on. So if you are on channel #blah, and you type /p then the client replaces the # sign with #blah, and the final command is /part #blah.
/op /mode # +o $1
To op someone you can now just type /op goat instead of the whole /mode command.
/dop /mode # -ooo $1 $2 $3
You can now deop three users by typing /dop goat mike bongo.
For multiple commands you should use a | character (the shifted character usually under the \ key). So to write an alias that kicks and bans someone:
/dkb /kick # $1 | /mode # +b $1
The [ ] evaluation brackets
If you want greater control over the order of evaluation of identifiers,
you can use the [ ] brackets. Identifiers within these brackets will be
evaluated first, from left to right. You can nest brackets.
/say % [ $+ [ $1 ] ]
You can also force a previously evaluated identifier to be re-evaluated by using extra [ ] brackets.
/set %x %y
/set %y Hiya!
/echo [ [ %x ] ]
The { } brackets
You can create multi-line scripts by using the { } brackets. This allows
you to create an alias which performs several commands.
/poem {
/msg $1 A horse is a horse..
/msg $1 A duck is a duck..
}
The If-then-else statement
You can use if-then-else statements to decide which parts of your script
executes based on the evaluation of a comparison.
/number {
if ($1 == 1) echo The number ONE
elseif ($1 == 2) echo The number TWO
else echo Unknown number!
}
This creates an alias which tests if the parameter you supplied is the number 1 or the number 2.
For more information, see the if-then-else section.
The Goto command
The /goto command allows you to jump from one point in a script to
another point.
/number {
if ($1 == 1) goto one
elseif ($1 == 2) goto two
else goto unknown
:one
echo The number ONE
halt
:two
echo The number TWO
halt
:unknown
echo Unknown number!
halt
}
Using a goto incorrectly could lead to an infinite loop. You can break out of a currently running script by pressing Control-Break.
Note: I didn't prefix the above commands with the / command prefix. This is because the command prefix is really only needed when entering a command on the command line. In scripts, all lines are assumed to start with a command, so you don't need to use the / command prefix.
While Loops
Repeats a loop containing a set of commands while the expression in
brackets is true.
var %i = 1
while (%i <= 10) {
echo 2 %i
inc %i
}
The expression in brackets uses the same format as an if-then-else statement.
Multiple while loops can be embedded. You can use /break to break out of the current loop, and /continue to jump to the beginning of the loop.
The Return command
The /return command halts a currently executing script and allows the
calling routine to continue processing.
You can also optionally specify a return value which will be stored in the $result identifier. The $result can then be used in the calling routine.
/return [value]
The Halt command
The /halt command halts a script and prevents any further processing.
You can use this in remote scripts to prevent mIRC from replying to normal
ctcp messages, or in aliases to halt an alias, and any calling aliases,
completely.
Identifiers and Variables
An Identifier returns the value of a built-in mIRC variable. For example,
$time would return the current time. Whenever mIRC finds an identifier
in your command, it replaces it with the current value of that identifier.
For a list of identifiers, see the Identifiers section.
Variables are identifiers whose values you can create and change yourself and use later in your scripts.
For more information on variables, see the Variables section.
Custom Identifiers
A custom identifier is just an alias which returns a value, and you
can use that aliases name with an identifier prefix.
For example, create an /add alias such as:
add {
%x = $1 + $2
return %x
}
And then use it in a command:
//echo Total is: $add(1,2)
You can supply as many parameters as you want, ie. $add(1,2,...,N).
You can also use the $prop identifier to refer to your own custom properties:
add {
%x = $1 + $2
if ($prop == negative) return $calc(-1 * %x)
return %x
}
//echo Total is: $add(1,2).negative
Note: Built-in identifiers of the same name have priority.
Remote Scripts
You can add aliases to remote scripts by using the alias prefix and
then entering your alias as usual.
alias add {
%x = $1 + $2
return %x
}
This is the same custom identifier as above, except it uses the alias prefix.
If you specify the -l switch in the alias definition, the alias becomes accessible only by commands in the same script and invisible to the command line and other scripts.
alias -l add {
%x = $1 + $2
return %x
}
Function Key support
You can redefine function keys to perform certain commands, just like
aliases. For example:
/F1 /say Hello!
/sF2 /query $1
/cF3 /ctcp $1 version
The s and c prefixes for Shift key and Control key respectively.
Note: A function key will behave differently depending on the window in which it is used. For example, when using it in a query window the $1 parameter refers to the selected users nickname. If you're on a channel and the nickname listbox is active then the function key will work on the selected nicknames. If the listbox is not active, the function key will just work on the channel.
Command prefixes
If you are executing a command from the command line ie. by typing
it into an editbox, you can force mIRC to evaluate identifiers in that
command by prefixing it with two // instead of one /. For example:
/echo My nickname is $me
Would print out "My nickname is $me" and would not evaluate the $me.
//echo My nickname is $me
Would print out "My nickname is Pengy" if your nickname was Pengy.
If you want to force a command to peform quietly ie. without printing out any information, then you can prefix it with a "." fullstop. For example:
/ignore somenick
Would print out information telling you that you are now igoring "somenick". If you don't want this information to be displayed, then you can used:
/.ignore somenick
If you want to peform a command without it being processed as an alias
, you can prefix it with a ! exclamation mark.
Comments
You can add comments to your scripts by using the ; semi-colon at the
start of a line.
;This is a comment
You can place comments anywhere in a script, they are ignored during processing.
The $& identifier
This identifier allows you to break up a single line into multiple
lines which are combined when the script is performed, so you can edit
long commands more easily:
longline {
echo This is an example of a long $&
line that has been split into multiple lines $&
to make it easier to edit
}
Popups
mIRC allows you to create custom popup menus for the status window, query/chat windows, channel windows, the channel nickname listbox, and main menubar. To create these you must know how to use IRC commands, how to create Aliases, and how to use Identifiers and Variables.
If you click the right mouse-button in a window, the popup menu for that window will appear and you can select menu-items which you have defined to perform certain tasks, such as opping a user or joining a channel.
Examples
Popup menu definitions use the format:
<menuitem>:<commands>
Get Help:/join #irchelp
The words before the ":" colon are the name of the menuitem. The words after the ":" colon are the commands that are to be performed. In this case, the menuitem you would see is "Get Help". The command that would be performed if you select this menuitem would be "/join #irchelp", as if you had typed it.
The format of the commands follows precisely the same as those in normal aliases. See the Aliases section to learn about aliases.
To create a Submenu, use a "." fullstop.
Join a Channel
.Get IRC help!:/join #irchelp
.Visit the folks at #friendly:/join #friendly
.Who shall we join?:/join $?
In this case, the name of the submenu is "Join a Channel". All the commands following it beginning with a "." are part of this submenu.
To create menus within a submenu, you just add more fullstops:
Channels
.Help
..irchelp:/join #irchelp
..mIRC:/join #mirc
..newbies:/join #newbies
.Other Channels
..Visit #friendly:/join #friendly
..Wibble Wobble:/join #wibble
.Join?:/join #$$?="Enter a channel name:"
To separate menuitems, you can use a single "-" dash on a line by itself.
whois ?:/whois $?
-
Misc
.Edit Temp:/run notepad.exe temp.txt
.say?: /say $?
.action?:/me $?
Names
.#irchelp: /names #irchelp
.#friendly: /names #friendly
.names ?:/names $?
-
channel list:/list
-
Join a Channel
.Get IRC help!:/join #irchelp
.Visit the folks at #friendly:/join #friendly
.Who shall we join?:/join $?
To use the popup menu for a channel nickname listbox, you need to select a nickname before the menu will pop up. Here is a simple nickname listbox popup menu:
Who Is?:/whois $1
-
Modes
.Op:/mode # +o $1
.Deop:/mode # -o $1
.Kick, Ban:/kick # $1 | /ban $1
-
DCC Send:/dcc send $1
DCC Chat:/dcc chat $1
-
Slap!:/me slaps $1 around a bit with a large trout
Query:/query $1 Hey you! hello? are you there...?
If you want to create a popup menu item which performs several commands, you can use the { } brackets. See the Aliases section for more information on how to use these.
Cookie {
if ($1 == $me) echo I give myself a cookie!
else echo I give $1 a cookie!
}
The above menitem can be used in the channel nicknames listbox. The $1 refers to the nickname of the user you have selected in the listbox. In this case, it checks to see if I've selected my own nickname, and if so displays the first message, otherwise it displays the second message.
The popup menus for the Query/Chat and the MenuBar work the same way as the channel listbox popup menu.
Identifiers and Variables
Variables or identifiers that are a part of a the title of a menu definition
are evaluated each time the popup appears. This allows you to create popup
menus that vary in appearance. If an entire menu item evaluates to $null,
it is not displayed.
Remote Scripts
You can place menu definitions in your remote scripts by using the
menu prefix.
menu status {
Server
.Links:/links
.Lusers:/lusers
.Motd:/motd
.Time:/time
}
This definition would add a submenu to your status window popup menu.
You can also specify channel, query, nicklist, and menubar as the menu name, and this will add menuitems to your current popup menus for each of these windows.
menu nicklist {
Slap
.Haddock:/me prods $1 with a haddock
}
This definition would add a submenu to your channel nickname listbox popup menu.
You can also specify popup menus for custom windows by specifying the custom window name.
menu @test {
dclick:/echo double-click!
}
The dclick item allows you to specify a command that will be performed when you double-click in a custom window listbox. You can also refer to $1 which holds the line number of the line that was double-clicked.
You can also specify multiple window names for a menu, eg.:
menu @dogs,@cats,@goats {
dclick: /echo double-click in $active
close: window -c $active
}
You can use the $menu identifier to refer to the menu that is about
to pop up or that is assocaited with the script being performed. This allows
you to modify the form of the popup based on whether it's a query, channel,
etc. popup menu:
menu query,nicklist {
$iif($menu == nicklist,Op):/mode # +o $$1
}
Remote
The remote allows you to create scripts that react to IRC Server events,
such as when a user joins a channel or sends you a message. This tool is
the most complex part of mIRC and to use it you must already know how to
use IRC Commands, how to create Aliases, and how to use Variables and Identifiers.
The remote consists of three distinct sections:
The Users section, where user addresses with assigned access levels are listed. Each User in your Users section can be assigned one or more levels. These access levels dictate which events a user will be able to access.
The Variables section, where the currently active variables are listed.
The Scripts section, where the scripts that you create are listed. You can load multiple scripts which work independently of each other. This means that a single IRC Server event can trigger events in one or more scripts. Scripts consist of events which can only be triggered by users who have the required access levels. You can also place Aliases in your scripts by using the alias prefix, and menus in your scripts by using the menu prefix.
Since Access Levels play an important part in the way scripts work, you should read about them carefully before proceeding. You should also take a look at remote Commands, Identifiers, and the Internal Address List, and the section on how to Halt default text being displayed if you want to display your own custom messages for events.
All of the following Events use the same general format except for the ctcp and raw events. The sections below provide you with information on each event as well as examples and tips on how to use them.
Note: You should never load or use a script that you don't understand.
Variables
Variables are temporary storage areas to which you can assign values
which you can use later in your scripts.
If a variable is referred to and it doesnt exist, it returns the value $null. The $null value can be used in comparisons in if-then-else statements to control branching etc.
The following commands allow you to create and set the values of variables.
/set [-snzuN] <%var> [value]
This sets the value of %var to the specified value.
If you specify the -uN switch, %var is unset after N seconds, assuming it is not set again by another script. If you specify a zero for N, the variable is unset when the script finishes.
The -z switch decreases %var until it reaches zero and then unsets it.
The -n switch makes it treat value as plain text.
/unset [-s] <%var>
This unsets and removes the specified variables from the variables
list. If you specify a variable with wildcard characters then all matching
variables will be removed.
/unset %test*
This will remove all variables beginning with the word %test.
You can also set/unset dynamic variables using [] brackets:
vartest {
set %a [ $+ b ] 1
set %a [ $+ c ] 2
set %a [ $+ d ] 3
echo ab = %ab
echo ac = %ac
echo ad = %ad
unset %a [ $+ b ] %a [ $+ c ] %a [ $+ d ]
}
/unsetall
This unsets and removes all variables from the variables list.
/inc [-cszuN] <%var> [value]
This increases the value of %var by value.
If you specify the -uN switch, %var is increased by the value once and then %var is unset N seconds later, assuming it is not set again by another script.
The -c switch increases %var once per second.
The -z switch decreases %var until it reaches zero and then unsets it.
/dec [-cszuN] <%var> [value]
This decreases the value of %var by value.
If you specify the -uN switch, %var is decreased by the value once and then %var is unset N seconds later, assuming it is not set again by another script.
The -c switch decreases %var once per second.
The -z switch decreases %var until it reaches zero and then unsets it.
You can also use the equal sign to assign values to variables:
%i = 5
%xyzi = 3.14159
%count = $1
And you can perform the following operations on variables when using the equal sign:
%x = 5 + 1
%x = 5 - %y
%x = %x * 2
%x = %z / $2
%x = $1 % 3
%x = 2 ^ %w
You can only perform a single operation in an assignment at this time.
You can also use the $calc() identifier which allows you to perform complex calculations.
//echo 1 $calc(3.14159 * (2 ^ %x % 3) - ($ticks / (10000 + 1)))
For floating point numbers you can also use the $round(N,D) and $int(N) identifiers to handle precision of the decimal digits. The number of decimals is currently limited to 5 digits.
Local Variables
Local variables are variables that exist only for the duration of the
script in which they are created and can only be accessed from within that
script. They can be created with the /var command:
/var %x
This creates the local variable %x in the current routine and can only be referenced from inside this routine.
/var %x = hello
This creates a local variable %x and assigns it the value hello.
You can create multiple local variables by separating them with commas:
/var %x = hello, %y, %z = $me
loop {
var %x = 1
:next
echo item %x
inc %x
if (%x < 10) goto next
}
Note: you can use /var -s to make a variable show the result when a
value is set.