The level in your ON JOIN event, requires that the person that joins have level 2 access.
Thus the IF statement is useless, since the level comparison will always equal 2.
Check the order that the levels are listed in in your userlist.
I found, via a small experiment that having
2:*!*@NetAdmin.XeroMem.Com
20:RusselB-mobile!*r.k.bairs@NetAdmin.XeroMem.Com
gives me 2 with
on *:join:#: echo $chan $ulevel
yet, using
20:RusselB-mobile!*r.k.bairs@NetAdmin.XeroMem.Com
2:*!*@NetAdmin.XeroMem.Com
gives me 20