is this right in any way? i cant figure out how to work variables 100% yet...

Code:
/var $msg == {if ($1 == !) /notice $nick }{elseif ($2 == @) /msg #}