This is an automated email from the git hooks/post-receive script. smcv pushed a commit to tag 1.51b in repository iortcw.
commit 69fd713631f018dbfb650b9f02fbc12f52c2eeee Author: MAN-AT-ARMS <[email protected]> Date: Tue Jun 13 14:29:36 2017 -0400 MP: Some Cmd_CallVote_f cleanup --- MP/code/game/g_cmds.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/MP/code/game/g_cmds.c b/MP/code/game/g_cmds.c index 0d736a3..30ac59b 100644 --- a/MP/code/game/g_cmds.c +++ b/MP/code/game/g_cmds.c @@ -1565,8 +1565,12 @@ void Cmd_CallVote_f( gentity_t *ent ) { } // found a client number to kick, so override votestring with better one - Com_sprintf( level.voteString, sizeof( level.voteString ), "clientkick \"%d\"", i ); - Com_sprintf( level.voteDisplayString, sizeof( level.voteDisplayString ), "kick %s", level.clients[i].pers.netname ); + if ( i != MAX_CLIENTS ) { + Com_sprintf( level.voteString, sizeof( level.voteString ), "clientkick \"%d\"", i ); + Com_sprintf( level.voteDisplayString, sizeof( level.voteDisplayString ), "kick %s", level.clients[i].pers.netname ); + } else { + return; + } #if 0 // JPW NERVE } else if ( !Q_stricmp( arg1,"kick" ) ) { @@ -1577,14 +1581,17 @@ void Cmd_CallVote_f( gentity_t *ent ) { if ( level.clients[i].pers.connected != CON_CONNECTED ) { continue; } -// strip the color crap out + + // strip the color crap out Q_strncpyz( cleanName, level.clients[i].pers.netname, sizeof( cleanName ) ); Q_CleanStr( cleanName ); if ( !Q_stricmp( cleanName, arg2 ) ) { kicknum = i; } } + Com_sprintf( level.voteDisplayString, sizeof( level.voteDisplayString ), "kick %s", level.clients[kicknum].pers.netname ); + if ( kicknum != MAX_CLIENTS ) { // found a client # to kick, so override votestring with better one Com_sprintf( level.voteString, sizeof( level.voteString ),"clientkick \"%d\"",kicknum ); } else { // if it can't do a name match, don't allow kick (to prevent votekick text spam wars) -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git _______________________________________________ Pkg-games-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

