mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2007
Posts: 228
M
Mpot Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Apr 2007
Posts: 228
Code:
menu query { 
  Message Forwarding
  .Enable:/set %message_forwarding on | /echo -a 4Message forwarding enabled.
  .Disable:/set %message_forwarding off | /echo -a 4Message forwarding disabled.
}

on *:TEXT:*:?:{
  if (%message_forwarding == on) {
    /msg $nick I am not here at the moment. You may join my channel to leave a message for me.
    /invite $nick #channel
  }
  else halt
}


Is there a way to set that to not respond if the same person has triggered it again within 5 minutes? IE, I have the script on, and then someone sends it a message. It auto responds. If they send another message, it will not respond to them again for five minutes. HOWEVER, it will respond to someone else. I can't think of how to do this with a timer.

Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

Code:

menu query {
  Message Forwarding
  .Enable:/set %message_forwarding on | /echo -a 4Message forwarding enabled.
  .Disable:/set %message_forwarding off | /echo -a 4Message forwarding disabled.
}

on *:TEXT:*:?:{
  if ((%message_forwarding == on) && (!$eval($+(%,msgfwd.,$nick),2))) {
    set -eu300 $+(%,msgfwd.,$nick) $true
    /msg $nick I am not here at the moment. You may join my channel to leave a message for me.
    /invite $nick #channel
  }
}



Link Copied to Clipboard