+++ /dev/null
-/Command.cc/1.9/Tue Jul 2 00:05:19 2002//
-/Command.hh/1.5/Thu Sep 10 19:58:31 1998//
-/CommandEntry.cc/1.15/Tue Jul 2 00:05:19 2002//
-/CommandEntry.hh/1.11/Thu Sep 10 19:58:31 1998//
-/Game.cc/1.4/Tue Jul 2 00:05:19 2002//
-/Game.hh/1.5/Tue Jul 2 00:05:19 2002//
-/Makefile/1.8/Fri Sep 11 15:47:50 1998//
-/Mamer.cc/1.19/Tue Jul 2 00:05:19 2002//
-/Mamer.hh/1.13/Tue Jul 2 00:05:19 2002//
-/Player.cc/1.4/Thu Sep 10 19:57:17 1998//
-/Player.hh/1.4/Tue Jul 2 00:02:40 2002//
-/Storage.cc/1.1/Thu Sep 10 19:57:17 1998//
-/Storage.hh/1.1/Thu Sep 10 19:58:41 1998//
-/Tourney.cc/1.12/Tue Jul 2 00:02:40 2002//
-/Tourney.hh/1.12/Tue Jul 2 00:02:40 2002//
-/TourneyParameters.cc/1.2/Thu Sep 10 19:57:17 1998//
-/TourneyParameters.hh/1.3/Thu Sep 10 19:58:41 1998//
-/TourneyPlayers.cc/1.7/Thu Sep 10 19:57:17 1998//
-/TourneyPlayers.hh/1.6/Thu Sep 10 19:58:41 1998//
-/User.cc/1.10/Thu Sep 10 19:57:17 1998//
-/User.hh/1.8/Thu Sep 10 19:58:41 1998//
-/command_list.h/1.2/Wed Oct 8 21:03:08 1997//
-/config.h/1.5/Thu Sep 10 19:58:20 1998//
-/link.cc/1.5/Thu Sep 10 19:57:17 1998//
-/link.hh/1.2/Wed Apr 15 16:56:34 1998//
-/linklist.hh/1.3/Thu Sep 10 19:58:41 1998//
-/main.cc/1.4/Thu Sep 10 19:57:17 1998//
-/mamer.config/1.1/Thu Sep 10 19:59:41 1998//
-/types.h/1.11/Thu Sep 10 19:58:20 1998//
-D/bin////
-D/data////
-D/help////
-D/logs////
-D/template////
+++ /dev/null
-lasker/bots/mamer
//
// Matthew E. Moses
//
-// $Revision: 1.9 $
-// $Date: 2002/07/02 00:05:19 $
+// $Revision: 1.8 $
+// $Date: 1998/09/10 19:57:17 $
//
-// $Author: tridge $
+// $Author: mlong $
// $Locker: $
//
// $Log: Command.cc,v $
-// Revision 1.9 2002/07/02 00:05:19 tridge
-// got rid of a bunch of RCS tags now that its in CVS
-//
// Revision 1.8 1998/09/10 19:57:17 mlong
// lots of little bug fixes and a few new features
//
//
//--------------------------------------------------------------------------
+// static char RCSid[] = "$Id: Command.cc,v 1.8 1998/09/10 19:57:17 mlong Exp $";
+
#include "Command.hh"
//- constructor -----------------------------------------------------------
//
// Matthew E. Moses & Michael A. Long
//
-// $Log: CommandEntry.cc,v $
-// Revision 1.15 2002/07/02 00:05:19 tridge
-// got rid of a bunch of RCS tags now that its in CVS
+// $Revision: 1.13 $
+// $Date: 1998/09/10 19:57:17 $
//
-// Revision 1.14 2002/07/02 00:02:40 tridge
-// - fixed compile on g++ 2.96
-// - updated for lasker 'rmatch'
+// $Author: mlong $
+// $Locker: $
//
+// $Log: CommandEntry.cc,v $
// Revision 1.13 1998/09/10 19:57:17 mlong
// lots of little bug fixes and a few new features
//
//
//--------------------------------------------------------------------------
+// static char RCSid[] = "$Id: CommandEntry.cc,v 1.13 1998/09/10 19:57:17 mlong Exp $";
+
#include "CommandEntry.hh"
#include "Mamer.hh"
int CommandEntry::JoinTourney(User *user, param_list params) {
Tourney *tourn = NULL;
Player *newEntry = NULL;
-
+printf("join\n");
tourn = gMamer.FindTourney(params[0].val.integer);
if(NULL != tourn) {
newEntry = new Player(user->name, params[0].val.integer);
+printf("entry=%d\n",newEntry);
gMamer.pendingList.Append(newEntry);
gMamer.XServerCom("getpi %s%s", user->name, "\n");
return(1);
}
-
+printf("error\n");
gMamer.TellUser(TourneyNotFound, user->name, params[0].val.integer);
return(0);
}
//
// Matthew E. Moses && Michael A. Long
//
-// $Revision: 1.4 $
-// $Date: 2002/07/02 00:05:19 $
+// $Revision: 1.3 $
+// $Date: 1998/09/10 19:57:17 $
//
-// $Author: tridge $
+// $Author: mlong $
// $Locker: $
//
// $Log: Game.cc,v $
-// Revision 1.4 2002/07/02 00:05:19 tridge
-// got rid of a bunch of RCS tags now that its in CVS
-//
// Revision 1.3 1998/09/10 19:57:17 mlong
// lots of little bug fixes and a few new features
//
//
//--------------------------------------------------------------------------
+// static char RCSid[] = "$Id: Game.cc,v 1.3 1998/09/10 19:57:17 mlong Exp $";
+
#include "Game.hh"
//- Constructor -----------------------------------------------------------
//
// Matthew E. Moses & Michael A. Long
//
-// $Revision: 1.5 $
-// $Date: 2002/07/02 00:05:19 $
+// $Revision: 1.3 $
+// $Date: 1998/09/10 19:58:41 $
//
-// $Log: Game.hh,v $
-// Revision 1.5 2002/07/02 00:05:19 tridge
-// got rid of a bunch of RCS tags now that its in CVS
-//
-// Revision 1.4 2002/07/02 00:02:40 tridge
-// - fixed compile on g++ 2.96
-// - updated for lasker 'rmatch'
+// $Author: mlong $
+// $Locker: $
//
+// $Log: Game.hh,v $
// Revision 1.3 1998/09/10 19:58:41 mlong
// lots of little bug fixes and a few new features.
//
//
// 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);
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);
}
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);
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
} //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");
// $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
//
//
// Matthew E. Moses & Michael A. Long
//
-// $Revision: 1.13 $
-// $Date: 2002/07/02 00:05:19 $
+// $Revision: 1.11 $
+// $Date: 1998/09/10 19:58:41 $
//
-// $Log: Mamer.hh,v $
-// Revision 1.13 2002/07/02 00:05:19 tridge
-// got rid of a bunch of RCS tags now that its in CVS
-//
-// Revision 1.12 2002/07/02 00:02:40 tridge
-// - fixed compile on g++ 2.96
-// - updated for lasker 'rmatch'
+// $Author: mlong $
+// $Locker: $
//
+// $Log: Mamer.hh,v $
// Revision 1.11 1998/09/10 19:58:41 mlong
// lots of little bug fixes and a few new features.
//
//
// Matthew E. Moses & Michael A. Long
//
-// $Revision: 1.4 $
-// $Date: 2002/07/02 00:02:40 $
+// $Revision: 1.3 $
+// $Date: 1998/02/12 18:44:25 $
//
-// $Author: tridge $
+// $Author: mlong $
// $Locker: $
//
// $Log: Player.hh,v $
-// Revision 1.4 2002/07/02 00:02:40 tridge
-// - fixed compile on g++ 2.96
-// - updated for lasker 'rmatch'
-//
// Revision 1.3 1998/02/12 18:44:25 mlong
// *** empty log message ***
//
//
// Matthew E. Moses
//
-// $Revision: 1.12 $
-// $Date: 2002/07/02 00:02:40 $
+// $Revision: 1.11 $
+// $Date: 1998/09/10 19:57:17 $
//
-// $Author: tridge $
+// $Author: mlong $
// $Locker: $
//
// $Log: Tourney.cc,v $
-// Revision 1.12 2002/07/02 00:02:40 tridge
-// - fixed compile on g++ 2.96
-// - updated for lasker 'rmatch'
-//
// Revision 1.11 1998/09/10 19:57:17 mlong
// lots of little bug fixes and a few new features
//
//
//--------------------------------------------------------------------------
-//static char RCSid[] = "$Id: Tourney.cc,v 1.12 2002/07/02 00:02:40 tridge Exp $";
+//static char RCSid[] = "$Id: Tourney.cc,v 1.11 1998/09/10 19:57:17 mlong Exp $";
#include "Tourney.hh"
#include "Mamer.hh"
params.rounds = GetPlayerCount() - 1;
break;
case 's':
- params.rounds = (int)ceil(log22(GetPlayerCount()));
+ params.rounds = (int)ceil(log2(GetPlayerCount()));
break;
default:
params.rounds = DEFAULT_ROUNDS;
//
// Matthew E. Moses & Michael A. Long
//
-// $Revision: 1.12 $
-// $Date: 2002/07/02 00:02:40 $
+// $Revision: 1.11 $
+// $Date: 1998/09/10 19:58:41 $
//
-// $Author: tridge $
+// $Author: mlong $
// $Locker: $
//
//--------------------------------------------------------------------------
//---------------------------------------------------------
// $Log: Tourney.hh,v $
-// Revision 1.12 2002/07/02 00:02:40 tridge
-// - fixed compile on g++ 2.96
-// - updated for lasker 'rmatch'
-//
// Revision 1.11 1998/09/10 19:58:41 mlong
// lots of little bug fixes and a few new features.
//
//- AddWhite ---------------------------------
void TourneyPlayers::AddWhite(void) {
consecutiveWhites++;
- totalWhites++; // [HGM] this variable did not seem to get updated anywhere
+ totalWhites++; // [HGM] this varable did not seem to get updater anywhere
ChangeColorDue(0);
ClearBlacks();
}//- end AddWhite
//- AddBlack ---------------------------------
void TourneyPlayers::AddBlack(void) {
consecutiveBlacks++;
- totalBlacks++; // [HGM] this variable did not seem to get updated anywhere
+ totalBlacks++; // [HGM] this varable did not seem to get updater anywhere
ChangeColorDue(1);
ClearWhites();
}//- end AddBlack
+++ /dev/null
-/cleaner.pl/1.1/Mon Jul 1 23:55:37 2002//
-/hindex.pl/1.1/Mon Jul 1 23:55:37 2002//
-/rank.pl/1.1/Mon Jul 1 23:55:37 2002//
-D
+++ /dev/null
-lasker/bots/mamer/bin
#endif
#ifndef DEFAULT_PATH
-#define DEFAULT_PATH "/home/mlong/mamer"
+#define DEFAULT_PATH "/home/hgm/mamer"
#endif
#ifndef DEFAULT_HELP_FILE_PATH
#endif
#ifndef DEFAULT_PASSWORD
-#define DEFAULT_PASSWORD "fkdi29s"
+#define DEFAULT_PASSWORD "passwordgoeshere"
#endif
#ifndef ABUSE_INCREMENT_VALUE
+++ /dev/null
-/managers/1.1/Mon Jul 1 23:55:42 2002//
-D
+++ /dev/null
-lasker/bots/mamer/data
+shaun
+tridge
admin
+andres
+++ /dev/null
-/about/1.1/Mon Jul 1 23:55:47 2002//
-/addchaos/1.1/Mon Jul 1 23:55:47 2002//
-/addtotourney/1.1/Mon Jul 1 23:55:47 2002//
-/announce/1.1/Mon Jul 1 23:55:47 2002//
-/chaos/1.1/Mon Jul 1 23:55:47 2002//
-/close/1.1/Mon Jul 1 23:55:47 2002//
-/create/1.1/Mon Jul 1 23:55:47 2002//
-/delete/1.1/Mon Jul 1 23:55:47 2002//
-/finger/1.1/Mon Jul 1 23:55:47 2002//
-/forfeit/1.1/Mon Jul 1 23:55:47 2002//
-/help/1.1/Mon Jul 1 23:55:47 2002//
-/index/1.1/Mon Jul 1 23:55:47 2002//
-/join/1.1/Mon Jul 1 23:55:47 2002//
-/keep/1.1/Mon Jul 1 23:55:47 2002//
-/listmanagers/1.1/Mon Jul 1 23:55:47 2002//
-/listplayers/1.1/Mon Jul 1 23:55:47 2002//
-/listtourneys/1.1/Mon Jul 1 23:55:47 2002//
-/listtourneyvars/1.1/Mon Jul 1 23:55:47 2002//
-/loadedusers/1.1/Mon Jul 1 23:55:47 2002//
-/manager_commands/1.1/Mon Jul 1 23:55:47 2002//
-/manager_help/1.1/Mon Jul 1 23:55:47 2002//
-/manager_level/1.1/Mon Jul 1 23:55:47 2002//
-/messman/1.1/Mon Jul 1 23:55:47 2002//
-/open/1.1/Mon Jul 1 23:55:47 2002//
-/performance/1.1/Mon Jul 1 23:55:47 2002//
-/rating/1.1/Mon Jul 1 23:55:47 2002//
-/setcommandlevel/1.1/Mon Jul 1 23:55:47 2002//
-/setmanagerlevel/1.1/Mon Jul 1 23:55:47 2002//
-/setres/1.1/Mon Jul 1 23:55:47 2002//
-/setstat/1.1/Mon Jul 1 23:55:47 2002//
-/settourneyvar/1.1/Mon Jul 1 23:55:47 2002//
-/showcommands/1.1/Mon Jul 1 23:55:47 2002//
-/showhelpfile/1.1/Mon Jul 1 23:55:47 2002//
-/shutdown/1.1/Mon Jul 1 23:55:47 2002//
-/swiss/1.1/Mon Jul 1 23:55:47 2002//
-/upset/1.1/Mon Jul 1 23:55:47 2002//
-/user_commands/1.1/Mon Jul 1 23:55:47 2002//
-/who/1.1/Mon Jul 1 23:55:47 2002//
-/withdraw/1.1/Mon Jul 1 23:55:47 2002//
-D
+++ /dev/null
-lasker/bots/mamer/help
+++ /dev/null
-lasker/bots/mamer/logs
-HOST freechess.org
+HOST 192.168.2.2
PORT 5000
CHAN 49
DBUG 5
-HOME /home/mlong/mamer
-DATA /home/mlong/mamer/data
-HELP /home/mlong/mamer/help
-UDB /home/mlong/mamer/players
-LOG /home/mlong/mamer/logs/mamer
+HOME /home/hgm/mamer
+DATA /home/hgm/mamer/data
+HELP /home/hgm/mamer/help
+UDB /home/hgm/mamer/players
+LOG /home/hgm/mamer/logs/mamer
USER mamer
-PASS lmwi39s8
+PASS jammer
+++ /dev/null
-/template.cc/1.1/Mon Jul 1 23:55:52 2002//
-/template.hh/1.1/Mon Jul 1 23:55:52 2002//
-D
+++ /dev/null
-lasker/bots/mamer/template