about summary refs log tree commit diff
path: root/src/game/server
diff options
context:
space:
mode:
authorRomain Labolle <ravomavain@gmail.com>2011-07-10 13:02:13 +0200
committeroy <Tom_Adams@web.de>2011-07-11 11:28:04 +0200
commita6dc6f34b63bc1acffe43f109ea655c6a2fefc9a (patch)
tree3e29e048e00e1a04aad48c2398294748117b5ec8 /src/game/server
parentfc13cc6c1881d7bcdf30fea7507927920611516c (diff)
downloadzcatch-a6dc6f34b63bc1acffe43f109ea655c6a2fefc9a.tar.gz
zcatch-a6dc6f34b63bc1acffe43f109ea655c6a2fefc9a.zip
Display a message when an admin forces a vote. Closes #759
Diffstat (limited to 'src/game/server')
-rw-r--r--src/game/server/gamecontext.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp
index a8b2f379..52eaca89 100644
--- a/src/game/server/gamecontext.cpp
+++ b/src/game/server/gamecontext.cpp
@@ -1264,6 +1264,8 @@ void CGameContext::ConForceVote(IConsole::IResult *pResult, void *pUserData)
 			return;
 		}
 
+		str_format(aBuf, sizeof(aBuf), "admin moved '%s' to spectator (%s)", pSelf->Server()->ClientName(SpectateID), pReason);
+		pSelf->SendChatTarget(-1, aBuf);
 		str_format(aBuf, sizeof(aBuf), "set_team %d -1 %d", SpectateID, g_Config.m_SvVoteSpectateRejoindelay);
 		pSelf->Console()->ExecuteLine(aBuf);
 	}
@@ -1290,6 +1292,8 @@ void CGameContext::ConVote(IConsole::IResult *pResult, void *pUserData)
 	else if(str_comp_nocase(pResult->GetString(0), "no") == 0)
 		pSelf->m_VoteEnforce = CGameContext::VOTE_ENFORCE_NO;
 	char aBuf[256];
+	str_format(aBuf, sizeof(aBuf), "admin forced vote %s", pResult->GetString(0));
+	pSelf->SendChatTarget(-1, aBuf);
 	str_format(aBuf, sizeof(aBuf), "forcing vote %s", pResult->GetString(0));
 	pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "server", aBuf);
 }