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
gives me 2 with
on *:join:#: echo $chan $ulevel
gives me 20
Well, that seems to have solved the problem I was having because I had the userlist as
So I switched my userlist around so that it goes from higher number users to lower number users instead and made it instead
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.