2 Copyright (C) 1996-1997 Id Software, Inc.
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 See the GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 Sends text across to be displayed
28 FIXME: make this just a stuffed echo?
31 void SV_ClientPrint(const char *msg)
33 if (host_client->netconnection)
35 MSG_WriteByte(&host_client->netconnection->message, svc_print);
36 MSG_WriteString(&host_client->netconnection->message, msg);
44 Sends text across to be displayed
45 FIXME: make this just a stuffed echo?
48 void SV_ClientPrintf(const char *fmt, ...)
51 char msg[MAX_INPUTLINE];
54 dpvsnprintf(msg,sizeof(msg),fmt,argptr);
64 Sends text to all active clients
67 void SV_BroadcastPrint(const char *msg)
72 for (i = 0, client = svs.clients;i < svs.maxclients;i++, client++)
74 if (client->active && client->netconnection)
76 MSG_WriteByte(&client->netconnection->message, svc_print);
77 MSG_WriteString(&client->netconnection->message, msg);
81 if (sv_echobprint.integer && cls.state == ca_dedicated)
89 Sends text to all active clients
92 void SV_BroadcastPrintf(const char *fmt, ...)
95 char msg[MAX_INPUTLINE];
98 dpvsnprintf(msg,sizeof(msg),fmt,argptr);
101 SV_BroadcastPrint(msg);
108 Send text over to the client to be executed
111 void SV_ClientCommands(const char *fmt, ...)
114 char string[MAX_INPUTLINE];
116 if (!host_client->netconnection)
119 va_start(argptr,fmt);
120 dpvsnprintf(string, sizeof(string), fmt, argptr);
123 MSG_WriteByte(&host_client->netconnection->message, svc_stufftext);
124 MSG_WriteString(&host_client->netconnection->message, string);