Hello,

I am creating an auto-responsder script and I want to have a txt file containing a list of people I want the autoresponsder to ignore. I got everything working except the delete exception alias. I want a nickname to COMPLETELY match a line on my txt file, which is why I coded it with the if nested under a while loop.

Code:
alias delexc {
  if (!$exists(C:\Users\Allen\AppData\Roaming\mIRC\exc.txt)) {
    /echo -c kick [ERROR] exc.txt Not Defined.
  }
  else {
    var %g = 0
    var %e = $false
    while (%g < $lines(C:\Users\Allen\AppData\Roaming\mIRC\exc.txt)) {
      inc %g
      if ($$1 == $read(exc.txt, n, %g)) {
        %e = $true
        /break
      }
    }
    if (%e == $true) {
      /write -dl<$readn> exc.txt
      /echo -c notify [AUTO-RESP] Nick $$1 No Longer Declared an Exception
    }
    else {
      /echo -c kick [ERROR] Nick $$1 Not Already Declared Exception
    }
  }
}

Last edited by xboxer16; 10/04/15 02:56 AM.