1.1 --- a/core/PlayerManager.cpp Tue Apr 27 21:07:59 2010 -0700
1.2 +++ b/core/PlayerManager.cpp Tue Apr 27 23:40:04 2010 -0700
1.3 @@ -1619,8 +1619,22 @@
1.4 {
1.5 MarkAsBeingKicked();
1.6 INetChannel *pNetChan = static_cast<INetChannel *>(engine->GetPlayerNetInfo(m_iIndex));
1.7 - IClient *pClient = static_cast<IClient *>(pNetChan->GetMsgHandler());
1.8 - pClient->Disconnect("%s", str);
1.9 + if (pNetChan == NULL)
1.10 + {
1.11 + /* What does this even mean? Hell if I know. */
1.12 + int userid = GetUserId();
1.13 + if (userid > 0)
1.14 + {
1.15 + char buffer[255];
1.16 + UTIL_Format(buffer, sizeof(buffer), "kickid %d %s\n", userid, str);
1.17 + engine->ServerCommand(buffer);
1.18 + }
1.19 + }
1.20 + else
1.21 + {
1.22 + IClient *pClient = static_cast<IClient *>(pNetChan->GetMsgHandler());
1.23 + pClient->Disconnect("%s", str);
1.24 + }
1.25 }
1.26
1.27 void CPlayer::Authorize_Post()