Hi,need some help pls

Code:
on *:TEXT:!calc*:#test: {
  if ($3 == $null) /notice $nick  $2 =7 $calc( $2 )

}

Its a simple calculator script ..works fine and all.
Code:
<~abc>!calc 500+500
from TestBot:500+500 =7 1000


But when i add comas (,) it dosn't read correctly.
Code:
<~abc>!calc 500,000+500,000
from TestBot:500,000+500,000 =7 500

If there's a script to amend that i'd like to have it please smile