Check in modified mamer
[capablanca.git] / lasker-2.2.3 / bots / mamer / Mamer.cc
index 38bfd59..ee10805 100644 (file)
@@ -3,11 +3,16 @@
 //
 // Matthew E. Moses & Michael A. Long
 //
-// $Revision: 1.19 $
-// $Date: 2002/07/02 00:05:19 $
+// $Revision: 1.17 $
+// $Date: 1998/09/10 19:57:17 $
+//
+// $Author: mlong $
+// $Locker:  $
 //
 //--------------------------------------------------------------------------
 
+// static char RCSid[] = "$Id: Mamer.cc,v 1.17 1998/09/10 19:57:17 mlong Exp $";
+
 #include "Mamer.hh"
 
 extern void HandleSignals(int);
@@ -134,6 +139,7 @@ int Mamer::Initialize(int argc, char **argv) {
        switch(errno) {
         case ENOENT:
            if(-1 == mkdir(userFilePath, S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IWGRP|S_IXGRP|S_IROTH|S_IXOTH)) {
+               printf("name = '%s'\n", userFilePath);
                perror("create user file path");
                return(0);
            }
@@ -1156,6 +1162,8 @@ int Mamer::HandleGame(char *message) {
   Game *g = NULL;
   TourneyPlayers *tp = NULL;
 
+  printf("MESSAGE: %s\n", message);
+
   // {Game 8 (Blammor vs. Havard) Blammor resigns} 0-1
 
   sscanf(message, "{Game %d (%s vs. %s", &gameNumber, user1, user2);
@@ -1286,7 +1294,7 @@ int Mamer::HandlePlayerInfo(char *message) {
           player, ratings[2], ratings[3], ratings[1], ratings[0], ratings[4], ratings[5]);
 
   p = FindPending(player);
-
+printf("player p=%d\n", p);
   if(p != NULL) {
     tourneyNumber = p->value;       // find out which tourney we want
     t = FindTourney(tourneyNumber); // Get the tourney.  If its in the list it should be valid
@@ -1295,6 +1303,7 @@ int Mamer::HandlePlayerInfo(char *message) {
   } //Check for valid tourney is done in CommandEntry::JoinTourney
 
   return_from_AddPlayer = t->AddPlayer(player, ratings[t->GetVariant()], 0.0);
+printf("ret = %d\n", return_from_AddPlayer);
   TellUser(JoinedTourney, player, return_from_AddPlayer);
   if(return_from_AddPlayer == 1)
     XServerCom("%s %s %d%s", "tournset", player, 1, "\n");
@@ -1969,13 +1978,6 @@ int Mamer::GenerateTourneyNumber(void) {
 
 
 // $Log: Mamer.cc,v $
-// Revision 1.19  2002/07/02 00:05:19  tridge
-// got rid of a bunch of RCS tags now that its in CVS
-//
-// Revision 1.18  2002/07/02 00:02:40  tridge
-// - fixed compile on g++ 2.96
-// - updated for lasker 'rmatch'
-//
 // Revision 1.17  1998/09/10 19:57:17  mlong
 // lots of little bug fixes and a few new features
 //