mirror of
https://github.com/glest/glest-source.git
synced 2025-08-13 03:44:00 +02:00
- 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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user