diff options
| author | Choupom <andycootlapin@hotmail.fr> | 2010-10-09 20:34:17 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2010-10-11 00:31:21 +0200 |
| commit | 61201fea1311b62bd5390a3f1684695073315290 (patch) | |
| tree | 88cf384c78c01ceb7fbd2218148e3fce2f701d2b /src/game/client/components/voting.cpp | |
| parent | 7aefbca742c20206ce18a64bc83322331ee67b39 (diff) | |
| download | zcatch-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.cpp | 11 |
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) |