/rcon is a client-side command it'll process regardless of whatever you do under OnPlayerText or OnPlayerCommandText. Just like /pagesize and /headmove and so on.
Have a closer look to the code. It prevents players to send this in the chat :" /rcon", yes, with the space so basically if someone types : "Use /rcon login 123!" he'll get flagged by the strfind above.