about summary refs log tree commit diff
path: root/src/game/client/components/voting.cpp
diff options
context:
space:
mode:
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)