summaryrefslogtreecommitdiff
path: root/src/game/g_cmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_cmds.c')
-rw-r--r--src/game/g_cmds.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index b4ac5ec2..c4025ced 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -1095,6 +1095,7 @@ void Cmd_CallVote_f( gentity_t *ent )
char reason[ MAX_TOKEN_CHARS ];
char *creason;
int clientNum = -1;
+ int id = -1;
team_t team;
trap_Argv( 0, cmd, sizeof( cmd ) );
@@ -1161,6 +1162,7 @@ void Cmd_CallVote_f( gentity_t *ent )
}
G_DecolorString( level.clients[ clientNum ].pers.netname, name, sizeof( name ) );
+ id = level.clients[ clientNum ].pers.namelog->id;
if( !Q_stricmp( vote, "kick" ) || !Q_stricmp( vote, "mute" ) ||
!Q_stricmp( vote, "denybuild" ) )
@@ -1223,7 +1225,7 @@ void Cmd_CallVote_f( gentity_t *ent )
}
Com_sprintf( level.voteString[ team ], sizeof( level.voteString[ team ] ),
- "mute %d", clientNum );
+ "mute %d", id );
Com_sprintf( level.voteDisplayString[ team ],
sizeof( level.voteDisplayString[ team ] ),
"Mute player '%s'", name );
@@ -1244,7 +1246,7 @@ void Cmd_CallVote_f( gentity_t *ent )
}
Com_sprintf( level.voteString[ team ], sizeof( level.voteString[ team ] ),
- "unmute %d", clientNum );
+ "unmute %d", id );
Com_sprintf( level.voteDisplayString[ team ],
sizeof( level.voteDisplayString[ team ] ),
"Unmute player '%s'", name );
@@ -1346,7 +1348,7 @@ void Cmd_CallVote_f( gentity_t *ent )
}
Com_sprintf( level.voteString[ team ], sizeof( level.voteString[ team ] ),
- "denybuild %d", clientNum );
+ "denybuild %d", id );
Com_sprintf( level.voteDisplayString[ team ],
sizeof( level.voteDisplayString[ team ] ),
"Take away building rights from '%s'", name );
@@ -1367,7 +1369,7 @@ void Cmd_CallVote_f( gentity_t *ent )
}
Com_sprintf( level.voteString[ team ], sizeof( level.voteString[ team ] ),
- "allowbuild %d", clientNum );
+ "allowbuild %d", id );
Com_sprintf( level.voteDisplayString[ team ],
sizeof( level.voteDisplayString[ team ] ),
"Allow '%s' to build", name );