Autoaway script for mIRC




The away flag is a very useful one, lets you be “justified” if you don’t answer someone’s query, or even lurk in incognito, so the pesters you don’t want to chat with, think you are not at the computer. In the first case, it often happens that you simply leave the PC connected, being AFK, but forget to activate the away. A simple script can check for how long you’ve been “idle” with mIRC (the idle time in mIRC represents the time from the last stroke on the Enter key, no matter if it’s been used to send a line to a channel or a chat window, or just to identify to NickServ, or something else).

You need to set both an alias and a script (this will work fine enough if you just installed a clean mIRC, or anyway if you’re not using other scripts).

You can use this addon to load the script without adding the lines yourself. All the instructions are in the TXT file, follow them. I suggest you to continue reading anyway, so you can have more details about the script.

Here’s what you need to add in the Aliases Panel (accessible pressing the button):

/CheckAway {
  //if (($idle > 300) && ($away == $false)) //away 8,2 I am away after 5 idle minutes
  //if (($idle < 300) && ($away == $true)) /away
}

Customize this alias by changing the idle time with the one you prefer (I setted it to turn on the away flag after 5 minutes – 300 seconds; just put your preferred idle time, in seconds, instead of the two “300” you find there), and putting a message you like instead of “I am away after 5 idle minutes” (the “8,2” is used to set the colour of the message. If you don’t know how to use colour codes in mIRC, leave it as it is, or remove it if you don’t like the colours I use .

Here’s instead what you need to add in the Remote Panel (accessible pressing the button):

on *:CONNECT:/timerChkAway 0 10 /CheckAway

If you followed the instructions in the other pages of this section, and already added an on CONNECT line, add the “/timerChkAway 0 10 /CheckAway” line as well to the routine. If you instead want to add the other scripts in these pages, then do the same, by using something like:

on *: CONNECT:{
  line1
  line2
  line3
  ...
  ...
}

and putting the proper commands where you find “line1” “line2” and so on.

Now, using this script togheter with the AutoAnswerer script you can find in this section, you will have a complete set of away scripts.

Leave a Reply

Your email address will not be published. Required fields are marked *