mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2015
Posts: 18
X
Pikka bird
OP Offline
Pikka bird
X
Joined: Apr 2015
Posts: 18
Hello, I am creating an auto-responded script on mIRC. I used this code, but I noticed when I closed a query and somebody msged me back within a couple minutes, and it autoresponded again. I was wondering if there was a way to limit this: like if somebody queried me it would not auto-respond again for 20 minutes. Additionally, any other features/ways to protect against flood suggestions would be highly appreciated.

Code:
on *:OPEN:?:*: {
  if (!$away) {
    /msg $nick Hello $nick $+ , I should be with you shortly. Feel free to leave a message. Note I have $query(0) queries open and have been idle for $duration($idle) $+ .
  } 
  else {
    /msg $nick Hello $nick $+ , I am currently away ( $+ $awaymsg $+ ). Feel free to leave a message. Note that I have $query(0) queries open and have been away for $duration($awaytime) $+ .
  }
}
alias rep {
  var %target = $$1
  /msg %target Hello %target $+ . How may I help you?
}


Joined: Sep 2014
Posts: 259
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2014
Posts: 259
Hi, try using a global temporary variable for each nick that msg's. Add to beginning of your script:

Code:
if (%autoreply. [ $+ [ $nick ] ]) return
set -u1200 %autoreply. $+ $nick 1

Last edited by Sakana; 09/04/15 03:48 AM.
Joined: Apr 2015
Posts: 18
X
Pikka bird
OP Offline
Pikka bird
X
Joined: Apr 2015
Posts: 18
Thanks, it worked perfectly after adding curly brackets before return and after 1.

If you dont mind, Id like to pick your brain about another little addition.
Is there a way where I could set up commands to add exceptions to a list where those nicks are not automessaged. What would be even better would be to detect if the sender of the message is an IRCop, Bot, or Support Agent (Im pretty sure this isnt possible unless I can somehow use their hostmask to detect it). How could I insert a check for this? THanks again.

Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
/dqwindow on

All new messages will appear in a dedicated query window (aka Single Message Window).

/notify NameOfAFriend

Any friends you add to your Notify List will pop open a normal query window instead of going to the dqwindow.

/dqwindow hide

Don't even want to see messages from strangers? Hide the dqwindow entirely. If they ask permission to message you, you can type /query TheirNick and you'll see any messages they had previously sent, sitting hidden in the dqwindow.

On *:TEXT:*:?: {
  <anti-flood method of your choosing>
  if ($query($nick)) { return }
  msg $nick Please ask for permission before messaging me.
}


You can send automated replies to people without their own normal query window, letting them know to ask permission.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!

Link Copied to Clipboard