diff options
Diffstat (limited to 'src/game/client/components/voting.cpp')
| -rw-r--r-- | src/game/client/components/voting.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/game/client/components/voting.cpp b/src/game/client/components/voting.cpp index 6e00a5d5..d8c87855 100644 --- a/src/game/client/components/voting.cpp +++ b/src/game/client/components/voting.cpp @@ -31,6 +31,22 @@ void CVoting::Callvote(const char *pType, const char *pValue, const char *pReaso Client()->SendPackMsg(&Msg, MSGFLAG_VITAL); } +void CVoting::CallvoteSpectate(int ClientID, const char *pReason, bool ForceVote) +{ + if(ForceVote) + { + char aBuf[128]; + str_format(aBuf, sizeof(aBuf), "set_team %d -1", ClientID); + Client()->Rcon(aBuf); + } + else + { + char aBuf[32]; + str_format(aBuf, sizeof(aBuf), "%d", ClientID); + Callvote("spectate", aBuf, pReason); + } +} + void CVoting::CallvoteKick(int ClientID, const char *pReason, bool ForceVote) { if(ForceVote) |