diff options
| author | oy <Tom_Adams@web.de> | 2010-10-11 01:06:44 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2010-10-11 01:06:44 +0200 |
| commit | b65a26fe93e54af74d6304e66ec5942ecf4c48e8 (patch) | |
| tree | aa64740d1b09c2744c5bfba5f99cddef702e60c6 /src/game/client/components/voting.cpp | |
| parent | 8557d3a022cf250628dc8a03bdc26efd0338bc5d (diff) | |
| download | zcatch-b65a26fe93e54af74d6304e66ec5942ecf4c48e8.tar.gz zcatch-b65a26fe93e54af74d6304e66ec5942ecf4c48e8.zip | |
fixed last commits
Diffstat (limited to 'src/game/client/components/voting.cpp')
| -rw-r--r-- | src/game/client/components/voting.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
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) |