diff options
| author | xalduin <xalduin@gmail.com> | 2010-06-02 13:18:46 -0400 |
|---|---|---|
| committer | xalduin <xalduin@gmail.com> | 2010-06-02 13:18:46 -0400 |
| commit | b1774d8713a843c8f632991ea62cedbdc5189c3e (patch) | |
| tree | 500fe6b78fb5a9391d7c9ea18dd1ef445fac0a30 /src/game/server/gamecontext.cpp | |
| parent | ba543c9df47e1f7ae831b1a7af12638becaca985 (diff) | |
| parent | edcfbc2f28b59ae430c5c2d2d33fb78e747ce838 (diff) | |
| download | zcatch-b1774d8713a843c8f632991ea62cedbdc5189c3e.tar.gz zcatch-b1774d8713a843c8f632991ea62cedbdc5189c3e.zip | |
Merge remote branch 'upstream/master'
Diffstat (limited to 'src/game/server/gamecontext.cpp')
| -rw-r--r-- | src/game/server/gamecontext.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index 795bb65f..c04dd945 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -647,6 +647,19 @@ void CGameContext::OnMessage(int MsgId, CUnpacker *pUnpacker, int ClientId) SendChatTarget(ClientId, "Invalid client id to kick"); return; } + if(KickId == ClientId) + { + SendChatTarget(ClientId, "You cant kick yourself"); + return; + } + if(Server()->IsAuthed(KickId)) + { + SendChatTarget(ClientId, "You cant kick admins"); + char aBufKick[128]; + str_format(aBufKick, sizeof(aBufKick), "%s called for vote to kick you", Server()->ClientName(ClientId)); + SendChatTarget(KickId, aBufKick); + return; + } str_format(aChatmsg, sizeof(aChatmsg), "%s called for vote to kick '%s'", Server()->ClientName(ClientId), Server()->ClientName(KickId)); str_format(aDesc, sizeof(aDesc), "Kick '%s'", Server()->ClientName(KickId)); |