mIRC Homepage
Posted By: ShavedApe problems with ignore - 08/07/03 01:50 AM
I can' seem to get ignore to work correctly
No doubt im doing it completly wrong but Ive searched the forums here and so far allthough helpfull i still havent found the answer frown

What I want is a simple trigger driven ignore script
!stop on nick = ignore on
!stop off nick = off

I tried the following but seem to turn ignore on for all not just the person in question

on *:text:!stop *:#: {
if ($nick !isop $chan) { halt }
if ($2 == on) && ($3 != $null) {
set %nick $3
.ignore -pcnd $address(%nick, 9)
.msg $chan ignoring $3 $address($3,9) Reason: $4!
/echo -a %nick has been ignored for $4
}
if ($2 == off) && ($3 != $null) {
/ignore -r $address($3, 9)
.msg $chan ignoring on $3 is now off!
}
if ($3 == $null) {
msg $chan  Have we forgotten something $nick $+ ?
}
}
Posted By: SladeKraven Re: problems with ignore - 08/07/03 02:21 AM
This code works for me:
Code:
on *:text:!stop *:#: {
  if ($nick !isop $chan) { halt }
  if ($2 == on) && ($3 != $null) {
    set %nick $3
    ignore -pcnd $address(%nick,9) 
    msg $chan ignoring $3 $address(%nick,9) Reason: $4! 
    echo -a %nick has been ignored for $4 
  }
  if ($2 == off) && ($3 != $null) {
    ignore -r $address($3,9) 
    msg $chan ignoring on $3 is now off!
  }
  if ($3 == $null) {
    msg $chan  Have we forgotten something $nick $+ ?
  } 
} 
Posted By: Jagfire Re: problems with ignore - 08/07/03 11:42 PM
/ignore also supports a type parameter, so you don't really have to use $address there.
Posted By: ShavedApe Re: problems with ignore - 09/07/03 12:04 PM
Thanks for your help guys seems I had a problem in my control.ini no doubt from ealier script tests my problem was that I had *!*@* in the control ini I have no idea how it got there but like i say it was no doubt from an earlier script.
Should of realised something was wrong I guess when I had to start using /ignore off
Wierd thing is I tried to remove and it would say they where not in there confused

Anyway script now works with a few minor details worked out smile
© mIRC Discussion Forums