Skip to content

Commit

Permalink
Forbid names starting with /, as they can be abused to make people wr…
Browse files Browse the repository at this point in the history
…ite chat commands
  • Loading branch information
def- committed Jul 8, 2016
1 parent d5a2df5 commit 0688229
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/engine/server/server.cpp
Expand Up @@ -348,6 +348,11 @@ int CServer::TrySetClientName(int ClientID, const char *pName)
if(!aTrimmedName[0])
return -1;

// check for names starting with /, as they can be abused to make people
// write chat commands
if(aTrimmedName[0] == '/')
return -1;

// make sure that two clients don't have the same name
for(int i = 0; i < MAX_CLIENTS; i++)
{
Expand Down

0 comments on commit 0688229

Please sign in to comment.