Playing Files


The play feature is a powerful tool that allows you to play text files to users or channels on IRC.


The play central dialog lists all of the currently queued play requests, and allows you to maintain the queue. Files are played in the order in which they are queued.


The play central dialog can be displayed with the /playctrl command.


The /play command


A play request can be added to the queue by using either the play dialog or the /play command. The play dialog can be displayed by using the /play command with no parameters. It supports most of the features of the /play command itself, described below.


/play [-aescpbnx q# m# f# rl# t#] [alias] [channel/nick/stop] <filename> [delay]


In its simplest form, you can play a text file to the current window with:


/play c:\text\poem.txt


This plays the file poem.txt to the current window, which must be a query or channel window, with a default delay of 1000 milliseconds, ie. 1 second. Empty lines are treated as a delay.


If you have flood protection turned on, /play sends all lines through the flood protection feature to prevent you from flooding yourself off the server.


The -a switch makes /play use specified alias instead of /msg or /notice.


The -e switch allows you to echo out the text to a window as it would be sent to the server.


The -s switch allows you to play commands to the status window while offline. If you do not specify the -s switch then you must be connected to a server to use the /play command.


The -c switch forces mIRC to interpret lines as actual commands instead of plain text.


The -p switch indicates that this is a priority play request and should be placed at the head of the queue for immediate playing. The current play request will be paused and will resume once this play request is finished.


The -b switch plays text in the clipboard to a window. The text is temporarily saved to a file playqN.txt, which is deleted once playing is completed.


The -n switch makes the play command use /notice instead of /msg.


The -q# switch specifies the maximum number of requests that can be queued. If the queue length is already larger than or equal to the specified number then the play request is ignored.


/play -q5 c:\text\info.txt 1000


The -m# switch limits the number of requests that can be queued by a specific user/channel. If the user/channel already has or exceeds the specified number of requests queued then the play request is ignored.


/play -m1 info.txt 1000


The above line limits each user to a maximum of one request at a time and ignores all of their other requests.


Note: The -q# and -m# switches only apply to a /play initiated via a remote definition, not by you.


To combine the above switches you would use:


/play -cpq5m1 info.txt 1000


The -r switch forces a single line to be chosen randomly from a file and played.


/play -r action.txt 1500


The -l# switch forces the specified line-number to be read from a file and played.


/play -l25 witty.txt 1500


The -f# switch plays the whole file starting from the specified line.


/play -f9 moo.txt


For switches -rlf the first line in the file can be a single number specifying the number of lines in the file, this speeds up the process of reading the file.


The -x switch makes the play command treat the first line in the file as plain text, even if it is a number.


The -t switch forces mIRC to look up the specified topic in the file and play all lines under that topic. For example:


/play -thelp1 help.txt


In the help.txt file you would have:










mIRC will play everything after [help1] and stop when it reaches the next topic header or the end of the file.


You can use the $pnick identifier in commands which identifies the nick/channel to which you are currently playing.


To stop the playing of a file and clear the play queue you can use /play stop.


The $play identifier


The $play(N) or $play(Nick,N) identifer returns information on items in the play queue.


Properties: type, fname, topic, pos, lines, delay, status


If you specify a nick, you can find out how many play requests a user has in the queue.