[Freeciv-Dev] (PR#10514) chat as username when observing
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] (PR#10514) chat as username when observing |
From: |
"Per I. Mathisen" <per@xxxxxxxxxxx> |
Date: |
Wed, 13 Oct 2004 12:59:33 -0700 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=10514 >
A silly bug: When observing a player and talking in game, you talk *as*
the player being observer. Patch attached.
- Per
Index: server/handchat.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/handchat.c,v
retrieving revision 1.32
diff -u -r1.32 handchat.c
--- server/handchat.c 11 Sep 2004 19:24:40 -0000 1.32
+++ server/handchat.c 13 Oct 2004 19:56:58 -0000
@@ -41,7 +41,9 @@
{
struct player *pplayer = pconn->player;
- if (!pplayer || strcmp(pplayer->name, ANON_PLAYER_NAME) == 0) {
+ if (!pplayer
+ || pconn->observer
+ || strcmp(pplayer->name, ANON_PLAYER_NAME) == 0) {
my_snprintf(buffer, len, "(%s)", pconn->username);
} else {
my_snprintf(buffer, len, "%s", pplayer->name);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#10514) chat as username when observing,
Per I. Mathisen <=
|
|