- disallow non compressed tileset downloads when client IP not on same subnet as host

- bugfix for LAN server broadcasting
- bugfix for empty message on player disconnect (now properly shows that player switched to AI mode)
This commit is contained in:
Mark Vejvoda
2011-11-29 05:07:18 +00:00
parent 28ae161c25
commit 7cf9c189b2
13 changed files with 153 additions and 34 deletions

View File

@@ -129,6 +129,18 @@ int ftpFindAccount(const char* name)
return 0;
}
const char * ftpFindAccountById(int userid)
{
if(userid == 0) {
return 0;
}
else if(ftpUsers[userid - 1].name[0] == '\0') {
return 0;
}
return ftpUsers[userid - 1].name;
}
/**
* @brief Checks the password of a user account
*
@@ -143,12 +155,15 @@ int ftpFindAccount(const char* name)
*/
int ftpCheckPassword(int userId, const char* passw)
{
if(!userId)
if(userId == 0) {
return -1;
else if(ftpUsers[userId - 1].passw[0] == '\0')
}
else if(ftpUsers[userId - 1].passw[0] == '\0') {
return 0;
else
}
else {
return strncmp(ftpUsers[userId - 1].passw, passw, MAXLEN_PASSWORD);
}
}
/**