diff options
| author | xalduin <xalduin@gmail.com> | 2010-06-02 11:26:42 -0400 |
|---|---|---|
| committer | xalduin <xalduin@gmail.com> | 2010-06-02 11:26:42 -0400 |
| commit | fee651735fd7a29cfbec6b13ea9efdecc0ccb688 (patch) | |
| tree | 500fe6b78fb5a9391d7c9ea18dd1ef445fac0a30 /src/game/server/gamecontext.cpp | |
| parent | f963189dc4bd94395dd1831b48cb900218a7347f (diff) | |
| parent | edcfbc2f28b59ae430c5c2d2d33fb78e747ce838 (diff) | |
| download | zcatch-fee651735fd7a29cfbec6b13ea9efdecc0ccb688.tar.gz zcatch-fee651735fd7a29cfbec6b13ea9efdecc0ccb688.zip | |
Merge remote branch 'upstream/master' into experimental
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)); |