[Commit]
rrserver dispatch.5c,1.12,1.13 games.5c,1.11,1.12 readreq.5c,1.6,1.7
Keith Packard
commit at keithp.com
Fri May 30 18:11:33 PDT 2003
- Previous message: [Commit] rrserver rrserve,1.1,1.2
- Next message: [Commit] rrserver dispatch.5c,1.13,1.14 games.5c,1.12,1.13
protocol,1.21,1.22 readreq.5c,1.7,1.8 rr.5c,1.6,1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: keithp
Update of /local/src/CVS/rrserver
In directory home.keithp.com:/tmp/cvs-serv13356
Modified Files:
dispatch.5c games.5c readreq.5c
Log Message:
Make sure NOTICE ACTIVE is sent. allow multiple word messages on input
Index: dispatch.5c
===================================================================
RCS file: /local/src/CVS/rrserver/dispatch.5c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- dispatch.5c 30 May 2003 23:13:38 -0000 1.12
+++ dispatch.5c 31 May 2003 00:11:31 -0000 1.13
@@ -446,10 +446,8 @@
assert_user ();
assert_game ();
for (int i = 0; i < dim(directions); i++)
- {
Games::move (&c.game.game, &c, color, directions[i]);
- respond ("MOVE %d\n", Games::count (&c.game.game));
- }
+ respond ("MOVE %d\n", Games::count (&c.game.game));
}
void undo () {
Index: games.5c
===================================================================
RCS file: /local/src/CVS/rrserver/games.5c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- games.5c 30 May 2003 22:15:14 -0000 1.11
+++ games.5c 31 May 2003 00:11:31 -0000 1.12
@@ -161,6 +161,8 @@
}
void set_state (&Game g, GameState state) {
+ if (g.state == state)
+ return;
g.state = state;
game_send (&g, "NOTICE GAMESTATE %G\n", state);
switch (state) {
@@ -187,6 +189,7 @@
validate, notify, expire);
break;
case GameState.Showing:
+ g.active = ClientRef.none;
set_active (&g);
break;
}
Index: readreq.5c
===================================================================
RCS file: /local/src/CVS/rrserver/readreq.5c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- readreq.5c 30 May 2003 23:13:38 -0000 1.6
+++ readreq.5c 31 May 2003 00:11:31 -0000 1.7
@@ -70,6 +70,11 @@
void text_ (&struct { string text; } packet) {
packet.text = word (f);
}
+ void texts_ (&struct { string text; } packet) {
+ packet.text = word (f);
+ while (!eol (f))
+ packet.text += " " + word (f);
+ }
void upper_ (&struct { string text; } packet) {
packet.text = upper (word (f));
}
@@ -158,7 +163,7 @@
break;
case "MESSAGE":
packet = (struct { string text; }) {};
- text_ (&packet);
+ texts_ (&packet);
req = (Request.MESSAGE) packet;
break;
case "PART":
- Previous message: [Commit] rrserver rrserve,1.1,1.2
- Next message: [Commit] rrserver dispatch.5c,1.13,1.14 games.5c,1.12,1.13
protocol,1.21,1.22 readreq.5c,1.7,1.8 rr.5c,1.6,1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Commit
mailing list