Note: The mainteinance of the scripting examples is discontinued since I no longer have an interest to continue doing so. The pages will remain here, for now, but that might not be the case in the future. You are free to download all the material on these pages and set a up mirror, or even continue the maintenance of the material by enhancing the examples yourself.

All the material in these examples are for the mIRC version 6.03. It is very likely that some or most of these examples won't work in future versions.

Randomizing quit messages

Quit messages were originally meant to tell the reason for leaving IRC. Neverthless IRC quit messages have evolved a lot like e-mail and usenet signatures: while the original purpose was to deliver information, the space is often used for funny oneliners and quotations. It might be tiresome for other people to see the same quotation or joke all over again. So, you can do like many others have already done: write or copy a big file with messages and randomly select one for quit message.

You can enter your own quit message to Options/IRC/Messages. You naturally notice that there is only one field where you can write only one message. The trick is that you can use identifiers in that field. Simply enter '$read(quits.txt)', create a file called quits.txt into your mIRC directory where each quit message is in one line. Any plaintext editor is fine, like Notepad that comes in the default installation of Windows. If the filename is without a directory, the directory where mIRC is located is assumed. You can also specify the full path. If the file or directory names have spaces, you can enclose the name in spaces.

Read the quit messages from quits.txt that is located in the same directory with mIRC
Quit Message: $read(quits.txt)

Read the quit messages from c:\stuff\quitmsgs.txt
Quit Message: $read(c:\stuff\quitmsgs.txt)

Read the quit messages from c:\weird stuff\funny quotes\simpsons.txt
Quit Message: $read("c:\weird stuff\funny quotes\simpsons.txt")

The file with quit messages should be a file in plain text format, not in Microsoft Word format (.doc), Rich Text Format (.rtf), or any other non-plaintext format. Here's an example file with quotations from Groucho Marx.

"Room service? Send up a larger room."
"I never forget a face, but in your case I'll be glad to make an exception."
"A man's only as old as the woman he feels."
"One morning I shot an elephant in my pajamas. How he got into my pajamas I'll never know."
"If I held you any closer I would be on the other side of you."
"I was married by a judge. I should have asked for a jury."
"Who are you going to believe, me or your own eyes?"
"Quote me as saying I was mis-quoted."
"A child of five could understand this. Fetch me a child of five."
"Those are my principles. If you don't like them I have others."

Even if the line seems to wrap to another line, keep them in one line. Otherwise you would get two messages: one with the beginning of the message and one with the rest of the message. The files don't have any specified size limit although it's natural that bigger files will be slower.

You should remember that even when you might not spend much attention to your own quit messages, others will see them, perhaps many times a day. This is why it's a bad idea to put something annoying or insulting to quit messages. Getting banned from channel just because have improper quit messages does not serve anyone's interests.

Last updated 2003-04-05, Janne 'Geetee' Nikula,