From b65a26fe93e54af74d6304e66ec5942ecf4c48e8 Mon Sep 17 00:00:00 2001 From: oy Date: Mon, 11 Oct 2010 01:06:44 +0200 Subject: fixed last commits --- src/game/client/components/voting.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/game/client/components/voting.cpp') diff --git a/src/game/client/components/voting.cpp b/src/game/client/components/voting.cpp index c5e6a56c..8a98e1b0 100644 --- a/src/game/client/components/voting.cpp +++ b/src/game/client/components/voting.cpp @@ -29,7 +29,7 @@ void CVoting::Callvote(const char *pType, const char *pValue) Client()->SendPackMsg(&Msg, MSGFLAG_VITAL); } -void CVoting::CallvoteKick(int ClientId, char *pReason) +void CVoting::CallvoteKick(int ClientId, const char *pReason) { char aBuf[32]; if(pReason[0]) @@ -55,11 +55,14 @@ void CVoting::CallvoteOption(int OptionId) } } -void CVoting::ForcevoteKick(int ClientId) +void CVoting::ForcevoteKick(int ClientId, const char *pReason) { - char Buf[32]; - str_format(Buf, sizeof(Buf), "kick %d", ClientId); - Client()->Rcon(Buf); + char aBuf[32]; + if(pReason[0]) + str_format(aBuf, sizeof(aBuf), "kick %d \"%s\"", ClientId, pReason); + else + str_format(aBuf, sizeof(aBuf), "kick %d", ClientId); + Client()->Rcon(aBuf); } void CVoting::ForcevoteOption(int OptionId) -- cgit 1.4.1