[Freeciv-Dev] quick server patch
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Hi
I've been looking at the diplomatic dialog code. My primary purpose was to
move as much of the platform independant code to a common file.
The folowing is a quick patch to the server to make the server side
handleing a little more loigcal.
Andy Black
Index: diplhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/diplhand.c,v
retrieving revision 1.30
diff -u -2 -r1.30 diplhand.c
--- diplhand.c 2000/06/27 13:20:28 1.30
+++ diplhand.c 2000/07/01 15:57:15
@@ -78,8 +78,12 @@
plr0=&game.players[packet->plrno0];
plr1=&game.players[packet->plrno1];
- pgiver=&game.players[packet->plrno_from];
+ /*pgiver=&game.players[packet->plrno_from];*/
+ /*Not needed. We know who sent the packet, so we know who accepted.
+ Unless someone is being verry sleezy, and spoofing packets from the
other player.
+ If they were that desperate to cheat, this wouldn't matter. If
they can spoof
+ the packet, they should know enough to spoof it corectly*/
- if((ptreaty=find_treaty(plr0, plr1)) && pgiver==pplayer) {
- if(ptreaty->plr0==pgiver)
+ if(ptreaty=find_treaty(plr0, plr1)/*&& pgiver=pplayer*/) {
+ if(ptreaty->plr0==pplayer) /*was pgiver*/
ptreaty->accept0=!ptreaty->accept0;
else
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] quick server patch,
Andy Black <=
|
|