- 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

@@ -254,12 +254,17 @@ LOCAL int normalizePath(char* path)
*/
const char* ftpGetRealPath(int id, const char* path, int normalize)
{
const char* ftpRoot;
char ftpRoot[2048]="";
int ftpRootLen;
int len;
ftpRoot = ftpGetRoot(sessions[id].userId, &len);
strcpy(ftpRoot,ftpGetRoot(sessions[id].userId, &len));
ftpRootLen = strlen(ftpRoot);
if(ftpRootLen > 0 && ftpRoot[ftpRootLen-1] != '/') {
strcat(ftpRoot,"/");
}
if(VERBOSE_MODE_ENABLED) printf("#1 ftpGetRealPath id = %d path [%s] ftpRoot [%s] sessions[id].workingDir [%s] normalize = %d\n", id, path, ftpRoot, sessions[id].workingDir,normalize);
if(VERBOSE_MODE_ENABLED) printf("#1 ftpGetRealPath id = %d path [%s] ftpRoot [%s] sessions[id].workingDir [%s] normalize = %d\n", id, path, ftpRoot, sessions[id].workingDir,normalize);
pathScratchBuf[0]='\0';
if(path[0] == '/' || strcmp(path,sessions[id].workingDir) == 0) // absolute path?