mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Sep 2003
Posts: 93
T
Talea Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Sep 2003
Posts: 93
Greetings I need some help... can anyone help with a little script. What is want is a partial msg ignore (eg: a non-opped, voiced user msgs me, the window will close and place them on temp ignore for example 30 mins) otherwise the msg is accepted.

this is what I have:
on *:text:*:?: {
.msg $nick [Auto Reply]: Sorry, I'm not accepting private messages at this time.
close -m $nick
ignore -nptu1800 $nick 4
}

This ignores everyone who msgs me... what I want is an option if I turn my msg ignore on - it will only ignore regular people.

Thanks,

Talea

Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Since a private message has nothing to do with channels, I'm assuming that by 'regular' you mean 'regular in all common channels between me and him'. In this case, you need to loop through $comchan($nick,N), something like this:
Code:
on ^*:open:?:*:{
  var %i = 1
  while $comchan($nick,%i) {
    if $nick !isreg $ifmatch { return }
    inc %i
  }
  .notice $nick [Auto Reply]: Sorry, I'm not accepting private messages at this time.
  ignore -nptu1800 $nick 4
  halt
}
Notice that:
  • I used on OPEN instead of on TEXT event. With on open, you can prevent the window from opening using /halt. This is better than letting the window open and then using /close -m to close it.
  • I changed .msg $nick to .notice $nick. That's because an automated reply should NEVER be a /msg, but a /notice. This to avoid endless loops of automated replies.


Last edited by qwerty; 10/04/04 02:47 PM.

/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Sep 2003
Posts: 93
T
Talea Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Sep 2003
Posts: 93
Ahh I've notices the differences... thanks for the reply and the tips. smile

Talea


Link Copied to Clipboard