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
Quote:
2:*!*@NetAdmin.XeroMem.Com
20:RusselB-mobile!*r.k.bairs@NetAdmin.XeroMem.Com
gives me 2 with
Code:
on *:join:#: echo $chan $ulevel
yet, using
Quote:
20:RusselB-mobile!*r.k.bairs@NetAdmin.XeroMem.Com
2:*!*@NetAdmin.XeroMem.Com
gives me 20