This would mean that it would always be [SERVER], no matter who sent a message. Did you test the code ingame? Actually I'm pretty sure it would already choose Server in line 53 (however I think the if-condition should be negated to make sense)