fixed issue with reason on forcevotekick

This commit is contained in:
oy 2010-10-13 20:31:21 +02:00
parent be315edfc0
commit fa768449e2
4 changed files with 7 additions and 7 deletions

View file

@ -1950,8 +1950,8 @@ void CClient::RegisterCommands()
{
m_pConsole = Kernel()->RequestInterface<IConsole>();
// register server dummy commands for tab completion
m_pConsole->Register("kick", "i?s", CFGFLAG_SERVER, 0, 0, "Kick player with specified id for any reason");
m_pConsole->Register("ban", "s?is", CFGFLAG_SERVER, 0, 0, "Ban player with ip/id for x minutes for any reason");
m_pConsole->Register("kick", "i?r", CFGFLAG_SERVER, 0, 0, "Kick player with specified id for any reason");
m_pConsole->Register("ban", "s?ir", CFGFLAG_SERVER, 0, 0, "Ban player with ip/id for x minutes for any reason");
m_pConsole->Register("unban", "s", CFGFLAG_SERVER, 0, 0, "Unban ip");
m_pConsole->Register("bans", "", CFGFLAG_SERVER, 0, 0, "Show banlist");
m_pConsole->Register("status", "", CFGFLAG_SERVER, 0, 0, "List players");

View file

@ -1437,8 +1437,8 @@ void CServer::RegisterCommands()
{
m_pConsole = Kernel()->RequestInterface<IConsole>();
Console()->Register("kick", "i?s", CFGFLAG_SERVER, ConKick, this, "");
Console()->Register("ban", "s?is", CFGFLAG_SERVER|CFGFLAG_STORE, ConBan, this, "");
Console()->Register("kick", "i?r", CFGFLAG_SERVER, ConKick, this, "");
Console()->Register("ban", "s?ir", CFGFLAG_SERVER|CFGFLAG_STORE, ConBan, this, "");
Console()->Register("unban", "s", CFGFLAG_SERVER|CFGFLAG_STORE, ConUnban, this, "");
Console()->Register("bans", "", CFGFLAG_SERVER|CFGFLAG_STORE, ConBans, this, "");
Console()->Register("status", "", CFGFLAG_SERVER, ConStatus, this, "");

View file

@ -59,7 +59,7 @@ void CVoting::ForcevoteKick(int ClientId, const char *pReason)
{
char aBuf[32];
if(pReason[0])
str_format(aBuf, sizeof(aBuf), "kick %d \"%s\"", ClientId, pReason);
str_format(aBuf, sizeof(aBuf), "kick %d %s", ClientId, pReason);
else
str_format(aBuf, sizeof(aBuf), "kick %d", ClientId);
Client()->Rcon(aBuf);

View file

@ -682,12 +682,12 @@ void CGameContext::OnMessage(int MsgId, CUnpacker *pUnpacker, int ClientId)
str_format(aChatmsg, sizeof(aChatmsg), "'%s' called for vote to kick '%s' (%s)", Server()->ClientName(ClientId), Server()->ClientName(KickId), pReason);
str_format(aDesc, sizeof(aDesc), "Kick '%s'", Server()->ClientName(KickId));
if (!g_Config.m_SvVoteKickBantime)
str_format(aCmd, sizeof(aCmd), "kick %d \"Kicked by vote\"", KickId);
str_format(aCmd, sizeof(aCmd), "kick %d Kicked by vote", KickId);
else
{
char aBuf[64] = {0};
Server()->GetClientIP(KickId, aBuf, sizeof(aBuf));
str_format(aCmd, sizeof(aCmd), "ban %s %d \"Banned by vote\"", aBuf, g_Config.m_SvVoteKickBantime);
str_format(aCmd, sizeof(aCmd), "ban %s %d Banned by vote", aBuf, g_Config.m_SvVoteKickBantime);
}
}