Code: Select all
//- ListManagers ------------------------------------------------------
int CommandEntry::ListManagers(User *user, param_list params) {
int i=1, needToDelete=0;
long last;
char filename[256], manager[NAMELEN], date[16];
User *u=NULL, *newUser = NULL;
struct tm *tmpDate;
FILE *theFile;
i = params[0].type; // just to get rid of the compiler messages
sprintf(filename, "%s/managers", gMamer.dataFilePath);
if((theFile = fopen(filename, "r"))) {
gMamer.XServerCom("%s %s %s %s%s", "qtell", user->name, "\\n", gMamer.username, "'s Manager List:\\n\\n");
gMamer.XServerCom("%2s%-18s %3s %4s %-8s%2s%-18s %3s %4s %-8s%s",
"","Name","Lvl","Tnys","Last", "","Name","Lvl","Tnys","Last", "\\n");
gMamer.XServerCom(" %-18s %3s %4s %-8s%2s%-18s %3s %4s %-8s%s",
"-----------------", "---", "----", "--------", "",
"-----------------", "---", "----", "--------", "", "\\n");
i=1;
memset(date, '\0', 64);
I guess at one time mamer must have been developed on a machine where a character occupies 4 bytes. It is a bit weird to use memset here in the first place; normally one would write date[0] = '\0';.
The bug is fixed now, but there is no way to re-load mamer with the already-played games of the tournament. Also not through tricks, because it will not make the same pairings as have already been played, because ratings changed, and some of the rounds were already paired by hand. So we will have to continue the tournament with hand-pairing.
I set up a web page where I will update the standings 'live', i.e. as soon as a game finishes I will upload the result and new standings there, so people can use it as replacement for the "mam games N" and "mam who N" commands normally used to see pairings and standings. The page is at
http://hgm.nubati.net/ACCA.html


