Hi Folks.. i am working on a blacklist script and so far it works fine.. I am adding a nick and reason and it saves and deletes fine..
Code
alias -l txt { return C:\Users\hifin\Desktop\mibbitnames\badnick.txt }
alias -l mychan { return #mastercontrol }

ON *:TEXT:!add *:$($mychan): {
  write $qt($txt) $2-
  msg $chan 4ADD Watched nick - $2-
}

ON *:TEXT:!del *:$($mychan): {
  write -d $qt($txt) $2-
  msg $chan 3DELETED Watched nick - $2-
}

ON *:TEXT:!viewlist:$($mychan): {
  var %t = $lines($txt)

  if (!$file($txt)) { msg $chan The file is empty! | return }

  msg $chan 6LIST Incoming PM
  msg $nick Start of file.. - (Lines: %t $+ )

  var %i = 1
  while (%i <= %t) { 
    var %r = $read($txt,n,%i)

    if (%r) { msg $nick %r }

    inc %i
  }

  msg $nick End of file. - (Size: $bytes($file($txt).size).suf $+ )
}

now.. the next part of my script checks a stripped out connect message for the nick which is always $4 against this txt file to get a match and if it does it will message the channel to say it has a match
Code
on ^*:snotice:*:{
if (Client connecting isin $1-) {
    window -nek @Connecting
    aline -hp  @Connecting 4 $+ $1- at $time on $date on $network
    msg #mastercontrol 6CONN $4 at $time and their IP is $remove($6,$chr(91),$chr(93))
    var %foundInTheList = $read(C:\Users\hifin\Desktop\mibbitnames\mibbitnick.txt, w, $4)
    if (%foundInTheList) {
      /msg #usercontrol $4 6connected  Mibbit default nick!
    }
    else {
      /msg #usercontrol $4 6Connected.
    }
    var %NaughtyList = $read(C:\Users\hifin\Desktop\mibbitnames\badnick.txt, ws, $4)
    if (%NaughtyList) {
      /msg #mastercontrol 9,1Connected Watched Nick  - $4
      splay -w C:/Users/hifin/Desktop/New_Server_Bot/mIRC/sounds/message.wav
    }
    haltdef
}
}


Which it does correctly..

What it wont do and what i do not know how to do.... is instead of saying that $4 is matched and has connected.. (Connected Watched Nick - nick)

is change the message so that it shows "Connected Watched Nick" - ( and displays the nick reason) from the text file