First off you love doing things complicated, lol... hash tables / ini would be best here but since you want txt here it is

A) don't critisize the length
B) As per your post its written
C) I even went out of my way to put a routine were if you delete a sector that on the next write it will write the sector however I didn't extend the delete routine for if you delete more then 1 sector a time before writting a new one you will cause the #'s on the script to not be proper like [1] [2] [3] [4] instead you will have [1] [3] [3] if for example you delete line [2] or something similar

Here's the script don't wear it out... hope its what your looking for, and since no one is writting for you others can maybe look at what I wrote and make it smaller. I know I can make a few extra alias and cut the script size if not half atleast 1/3rd it's size.

Code:
alias findinfo {
  if ($$1 isnum) && (!$2) && (!$3) { 
    var %x = $read(ty.txt,nw,$+(*[,$$1,]*))
    var %y = $readn
    return $read(ty.txt,n,%y) $read(ty.txt,n,$calc(%y + 1)) $read(ty.txt,n,$calc(%y + 2)) $read(ty.txt,n,$calc(%y + 3))
  }
  if ($$1 isnum) && ($$2 == Nickname) && (!$3) { 
    var %x = $read(ty.txt,nw,$+(*[,$$1,]*))
    var %y = $readn
    return $gettok($read(ty.txt,n,$calc(%y + 1)),2,32)
  }
  if ($$1 isnum) && ($$2 == Nickname) && ($$3 == Address) { 
    var %x = $read(ty.txt,nw,$+(*[,$$1,]*))
    var %y = $readn
    return $read(ty.txt,n,%y) $read(ty.txt,n,$calc(%y + 1)) $read(ty.txt,n,$calc(%y + 2))  
  }
}

alias writeinfo { 
  if (%info.v) {
    var %x = $gettok(%info.v,2,32)
    .write -il $+ %x ty.txt $+([,$gettok($v1,1,32),])
    .write -il $+ $calc(%x + 1) ty.txt Nickname: $1
    .write -il $+ $calc(%x + 2) ty.txt Address: $2
    .write -il $+ $calc(%x + 3) ty.txt Channel: $3
    .unset %info.v
  }
  else {
    if (%info.d) {
      .write ty.txt $+([,%info.d,]) | inc %info.d
      .write ty.txt Nickname: $1
      .write ty.txt Address: $2
      .write ty.txt Channel: $3
    }
    else { 
      .write ty.txt $+([,1,]) | %info.d = 2
      .write ty.txt Nickname: $1
      .write ty.txt Address: $2
      .write ty.txt Channel: $3
    }
  }
}

alias delinfo {
  if ($$1 isnum) && (!$2) {
    var %x = $read(ty.txt,nw,$+(*[,$$1,]*)) 
    .write -dl $+ $readn ty.txt
    .write -dl $+ $readn ty.txt
    .write -dl $+ $readn ty.txt
    .write -dl $+ $readn ty.txt
    %info.v = $$1 $readn
  }
  if ($$1 isnum) && ($$2 == Channel) {
    var %x = $read(ty.txt,nw,$+(*[,$$1,]*))
    .write -l $+ $calc($readn + 3) ty.txt Channel:
  }
  if ($$1 isnum) && ($$2 == Address) {
    var %x = $read(ty.txt,nw,$+(*[,$$1,]*))
    .write -l $+ $calc($readn + 3) ty.txt Address:
  }
  if ($$1 isnum) && ($$2 == Nickname) {
    var %x = $read(ty.txt,nw,$+(*[,$$1,]*))
    .write -l $+ $calc($readn + 3) ty.txt Nickname:
  }
}

alias replaceinfo {
  if ($$1 isnum) && ($$2 == Channel) && ($$3) {
    var %x = $read(ty.txt,nw,$+(*[,$$1,]*))
    .write -l $+ $calc($readn + 3) ty.txt Channel: $$3
  }
  if ($$1 isnum) && ($$2 == Address) {
    var %x = $read(ty.txt,nw,$+(*[,$$1,]*))
    .write -l $+ $calc($readn + 3) ty.txt Address: $$3
  }
  if ($$1 isnum) && ($$2 == Nickname) {
    var %x = $read(ty.txt,nw,$+(*[,$$1,]*))
    .write -l $+ $calc($readn + 3) ty.txt Nickname: $$3
  }
}