about summary refs log tree commit diff
path: root/src/game/client/components/voting.cpp
diff options
context:
space:
mode:
authorChoupom <andycootlapin@hotmail.fr>2010-10-09 20:34:17 +0200
committeroy <Tom_Adams@web.de>2010-10-11 00:31:21 +0200
commit61201fea1311b62bd5390a3f1684695073315290 (patch)
tree88cf384c78c01ceb7fbd2218148e3fce2f701d2b /src/game/client/components/voting.cpp
parent7aefbca742c20206ce18a64bc83322331ee67b39 (diff)
downloadzcatch-61201fea1311b62bd5390a3f1684695073315290.tar.gz
zcatch-61201fea1311b62bd5390a3f1684695073315290.zip
added reason to kick a player in the callvote tab
Diffstat (limited to 'src/game/client/components/voting.cpp')
-rw-r--r--src/game/client/components/voting.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/game/client/components/voting.cpp b/src/game/client/components/voting.cpp
index 17c0fe31..c5e6a56c 100644
--- a/src/game/client/components/voting.cpp
+++ b/src/game/client/components/voting.cpp
@@ -29,11 +29,14 @@ void CVoting::Callvote(const char *pType, const char *pValue)
 	Client()->SendPackMsg(&Msg, MSGFLAG_VITAL);
 }
 
-void CVoting::CallvoteKick(int ClientId)
+void CVoting::CallvoteKick(int ClientId, char *pReason)
 {
-	char Buf[32];
-	str_format(Buf, sizeof(Buf), "%d", ClientId);
-	Callvote("kick", Buf);
+	char aBuf[32];
+	if(pReason[0])
+		str_format(aBuf, sizeof(aBuf), "%d %s", ClientId, pReason);
+	else
+		str_format(aBuf, sizeof(aBuf), "%d", ClientId);
+	Callvote("kick", aBuf);
 }
 
 void CVoting::CallvoteOption(int OptionId)