On *:Text:!loan & &:#Loans: {
var %msg = $nick wants $2 at $time on $date for $3
if ($read(loans.txt,w,$+(*,$nick,*))) {
write $+(-l,$readn) loans.txt $nick wants $calc($gettok($ifmatch,3,32) + $2) at $time for $3
msg $chan Updated loan: $nick: $read(loans.txt,$readn)
}
else {
write loans.txt %msg
msg $chan %msg
}
}