I thought it was something like that, but the second part is still not getting triggered, here's the full thing.

Code:
on *:text:*:#: {
  if ($1 = $setting(quotes,prefix) $+ quote) && ($setting(quotes,sendquotes) = 1)  {
    var %u = $2, %t = $ini(system/data/quotes.ini,%u,0)
    if (%t != 0) {
      var %n = $r(1,%t) | msg $chan Quote by: %u on $asctime($ini($quote_file,%u,%n),ddd doo mmm/yy @ h:nnt)) ( $+ $dur($calc($ctime - $ini($quote_file,%u,%n))) ago) $+ ; $readini($quote_file,%u,$ini($quote_file,%u,%n))
    }
    if ($1 = $setting(quotes,prefix) $+ addquote) && ($setting(quotes,chatterquotes) = 1) { 
      if ($4) { writeini system/data/quotes.ini $3 $ctime $4- | notice $nick Added $4 on $asctime(ddd doo mmm/yy @ h:nnt) for  $+ $nick | _quote_refresh }
    }
  }
}