Code:
  
dialog nicklist {
  title "Nicklist  [ /nicklist ]"
  size -1 -1 159 92
  option dbu
  list 1, 5 16 150 70, size
  box "", 4, 2 1 156 88
  edit "", 5, 5 5 72 10, read
  edit "", 6, 82 5 72 10, read
}
on *:dialog:nicklist:*:*:{
  if ($devent == init) {
    .slist
    dll $mdx SetMircVersion $version 
    dll $mdx MarkDialog $dname
    dll $mdx SetControlMDX $dname 1 ListView report single grid > $views
    did -i $dname 1 1 headerdims 115
    did -i $dname 1 1 headertext Nicks
    did -a $dname 5 $server
    did -a $dname 6 Channel : $+ $active $+
    .readlist 1 $active nicks
  }
}

alias slist {
  var %i 1
  :start
  while (%i <= $nick(#,0)) {
    .writeini nicklist.ini $active nicks $iif($readini(nicklist.ini,$active,nicks),$+($ifmatch,$chr(44),$nick(#,%i).pnick),$nick(#,%i).pnick))
    inc %i
    goto start
  }
}
alias  readlist {
  var %a = 1
  did -r $dname $1
  while ($gettok($readini(nicklist.ini,$2,$3),%a,44)) {
    did -az $dname $1 $ifmatch
    inc %a
  }
}


This is what i got so far.. but how do i make it clear the ini every time? because if someone leaves the channel.. it still shows them in the list.