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
Well, that seems to have solved the problem I was having because I had the userlist as
2:*!~??!*
20:GB!*GB@hostmas
So I switched my userlist around so that it goes from higher number users to lower number users instead and made it instead
20:GB!*GB@hostmask
2:*!~??!*
And put the script back to
on +2:JOIN:#ScriptTesting:/mode $chan +b $mask($fulladdress,2) | /kick $chan $nick
which appears to work as it now doesn't trigger on whoever matches level 20, yet will trigger on whoever matches level 2.