This is not working. Why? (Yes, the access level syscon is taken care of)

Code:
on syscon:text:!join*:#:{
if ($2 ischan) { /notice $nick I'm already on $2 | halt }
if ($3 == $null) { /join $2 | /notice $nick Join attempt on $$2 complete. | /write C:\IcyBot2\Scripts\op_log.txt On $date(dddd $+ $chr(44) mmmm d $+ $chr(44) yyyy) at $time(h:nn:ss TT) $nick used $$1 $$2 on $chan | halt }
if ($3 != $null) { /join $2 $3 | /notice $nick Join attempt on $$2 with password $$3 complete. | /write C:\IcyBot2\Scripts\op_log.txt On $date(dddd $+ $chr(44) mmmm d $+ $chr(44) yyyy) at $time(h:nn:ss TT) $nick used $$1 $$2 on $chan | halt }
}