Code:
on *:text:!add*:#:{
  write msgs.txt $time $address
  write msgs.txt $nick said: $2-
}
on *:text:!delete*:#:{
  if ($address isin $read(msgs.txt)) { delete both lines which used to be added  }
}  


Hope that was understandingly :]