summaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorBen Millwood <thebenmachine@gmail.com>2009-10-03 11:59:14 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:15:34 +0000
commitbb8b36150fe210e050ed47781f8cded1cf753b68 (patch)
treec4d4fa64600cf3b8869a7f1da57977e20db3ebb3 /src/server
parentac3e5586cd56657ff1b6f5f64af7e1d7c76b410d (diff)
* Experimental cg_voipTeamOnly handling on the server
Diffstat (limited to 'src/server')
-rw-r--r--src/server/sv_client.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/server/sv_client.c b/src/server/sv_client.c
index ca8dd86d..4be1ec10 100644
--- a/src/server/sv_client.c
+++ b/src/server/sv_client.c
@@ -1536,6 +1536,13 @@ void SV_UserVoip( client_t *cl, msg_t *msg ) {
else if ( ((i >= 62) && (i < 93)) && ((recip3 & (1 << (i-62))) == 0) )
continue; // not addressed to this player.
+ // this is not really the best way to do this
+ else if (Info_ValueForKey(svs.clients[sender].userinfo,
+ "cg_voipTeamOnly") &&
+ Info_ValueForKey(svs.clients[sender].userinfo, "t") !=
+ Info_ValueForKey(svs.clients[i].userinfo, "t"))
+ continue;
+
// Transmit this packet to the client.
// !!! FIXME: I don't like this queueing system.
if (client->queuedVoipPackets >= (sizeof (client->voipPacket) / sizeof (client->voipPacket[0]))) {