i'm not sure if this is a problem but ($2) isn't checking against anything.

$2 doesnt need to be checked against anything he can just check if it exists with ($2), however it HAD to exist as he was using :!addnick *: as his matchtext so it must have existed for the event to trip.

on *:TEXT:*!friendsnick*:*:echo -a too add your nickname too my friends list just say this !addnick <yournickname> <realname>
  if ($2 != $null) && ($read(friends_nicks.txt,s,$2)) { 
  elseif ($2 != $null) $read(friends_nicks.txt,s,$2)) && ($2) { 

Still echoing on first event.
these are the big problem "$read(friends_nicks.txt,s,$2)" the help file isnt really clear but lets assume you have a file as follows
--- file.txt ----
first line is this
middle line is here
last line of the file
--- file.txt ----

//echo -a ' $+ $read(file.txt,nts,middle) $+ '
'line is here'

//echo -a ' $+ $read(file.txt,ntw,middle *) $+ '
'middle line is here'

When using the ,s, option it locates a matching line and displays the REMAINING text of that line, sometimes this is nothing and gives a false $null for not found, not good frown