about summary refs log tree commit diff
path: root/src/game/server
diff options
context:
space:
mode:
authorFujnky <larsfunke1996@gmail.com>2010-09-05 20:18:14 +0200
committeroy <Tom_Adams@web.de>2010-09-07 01:11:20 +0200
commit69adb4800eca6fafb0754197ef5586f5a463c66b (patch)
treea401a283392b1a2538c0756554ca871a38965559 /src/game/server
parent0cfd1de7603c16be64df6db6315c63aea3daaceb (diff)
downloadzcatch-69adb4800eca6fafb0754197ef5586f5a463c66b.tar.gz
zcatch-69adb4800eca6fafb0754197ef5586f5a463c66b.zip
Put quotes around player names in server messages.
Diffstat (limited to 'src/game/server')
-rw-r--r--src/game/server/gamecontext.cpp2
-rw-r--r--src/game/server/gamemodes/ctf.cpp4
-rw-r--r--src/game/server/player.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp
index 1b96b812..9db02cea 100644
--- a/src/game/server/gamecontext.cpp
+++ b/src/game/server/gamecontext.cpp
@@ -499,7 +499,7 @@ void CGameContext::OnClientEnter(int ClientId)
 	//world.insert_entity(&players[client_id]);
 	m_apPlayers[ClientId]->Respawn();
 	char aBuf[512];
-	str_format(aBuf, sizeof(aBuf), "%s entered and joined the %s", Server()->ClientName(ClientId), m_pController->GetTeamName(m_apPlayers[ClientId]->GetTeam()));
+	str_format(aBuf, sizeof(aBuf), "\"%s\" entered and joined the %s", Server()->ClientName(ClientId), m_pController->GetTeamName(m_apPlayers[ClientId]->GetTeam()));
 	SendChat(-1, CGameContext::CHAT_ALL, aBuf); 
 
 	str_format(aBuf, sizeof(aBuf), "team_join player='%d:%s' team=%d", ClientId, Server()->ClientName(ClientId), m_apPlayers[ClientId]->GetTeam());
diff --git a/src/game/server/gamemodes/ctf.cpp b/src/game/server/gamemodes/ctf.cpp
index 4b25fc47..b28191af 100644
--- a/src/game/server/gamemodes/ctf.cpp
+++ b/src/game/server/gamemodes/ctf.cpp
@@ -120,11 +120,11 @@ void CGameControllerCTF::Tick()
 					float CaptureTime = (Server()->Tick() - F->m_GrabTick)/(float)Server()->TickSpeed();
 					if(CaptureTime <= 60)
 					{
-						str_format(aBuf, sizeof(aBuf), "The %s flag was captured by %s (%d.%s%d seconds)", fi ? "blue" : "red", Server()->ClientName(F->m_pCarryingCharacter->GetPlayer()->GetCID()), (int)CaptureTime%60, ((int)(CaptureTime*100)%100)<10?"0":"", (int)(CaptureTime*100)%100);
+						str_format(aBuf, sizeof(aBuf), "The %s flag was captured by \"%s\" (%d.%s%d seconds)", fi ? "blue" : "red", Server()->ClientName(F->m_pCarryingCharacter->GetPlayer()->GetCID()), (int)CaptureTime%60, ((int)(CaptureTime*100)%100)<10?"0":"", (int)(CaptureTime*100)%100);
 					}
 					else
 					{
-						str_format(aBuf, sizeof(aBuf), "The %s flag was captured by %s", fi ? "blue" : "red", Server()->ClientName(F->m_pCarryingCharacter->GetPlayer()->GetCID()));
+						str_format(aBuf, sizeof(aBuf), "The %s flag was captured by \"%s\"", fi ? "blue" : "red", Server()->ClientName(F->m_pCarryingCharacter->GetPlayer()->GetCID()));
 					}
 					GameServer()->SendChat(-1, -2, aBuf);
 					for(int i = 0; i < 2; i++)
diff --git a/src/game/server/player.cpp b/src/game/server/player.cpp
index cc89c11d..6fb6281c 100644
--- a/src/game/server/player.cpp
+++ b/src/game/server/player.cpp
@@ -153,7 +153,7 @@ void CPlayer::SetTeam(int Team)
 		return;
 		
 	char aBuf[512];
-	str_format(aBuf, sizeof(aBuf), "%s joined the %s", Server()->ClientName(m_ClientID), GameServer()->m_pController->GetTeamName(Team));
+	str_format(aBuf, sizeof(aBuf), "\"%s\" joined the %s", Server()->ClientName(m_ClientID), GameServer()->m_pController->GetTeamName(Team));
 	GameServer()->SendChat(-1, CGameContext::CHAT_ALL, aBuf); 
 	
 	KillCharacter();