mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-12 23:44:39 +00:00
Stopped some crashes, Make say commands go to the server if connected to a real qw server.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1988 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
f061e38c92
commit
9cc160d7fb
1 changed files with 18 additions and 10 deletions
28
fteqtv/qw.c
28
fteqtv/qw.c
|
@ -518,6 +518,8 @@ void NewQWClient(cluster_t *cluster, netadr_t *addr, char *connectmessage)
|
||||||
QW_PrintfToViewer(viewer, "Welcome to FTEQTV\n");
|
QW_PrintfToViewer(viewer, "Welcome to FTEQTV\n");
|
||||||
QW_StuffcmdToViewer(viewer, "alias admin \"cmd admin\"\n");
|
QW_StuffcmdToViewer(viewer, "alias admin \"cmd admin\"\n");
|
||||||
QW_PrintfToViewer(viewer, "Type admin for the admin menu\n");
|
QW_PrintfToViewer(viewer, "Type admin for the admin menu\n");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QTV_Rcon(cluster_t *cluster, char *message, netadr_t *from)
|
void QTV_Rcon(cluster_t *cluster, char *message, netadr_t *from)
|
||||||
|
@ -1253,21 +1255,27 @@ void QTV_Say(cluster_t *cluster, sv_t *qtv, viewer_t *v, char *message)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
*v->expectcommand = '\0';
|
||||||
|
|
||||||
if (cluster->notalking)
|
if (cluster->notalking)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
*v->expectcommand = '\0';
|
if (qtv && qtv->usequkeworldprotocols)
|
||||||
|
SendClientCommand(qtv, "say %s: %s\n", v->name, message);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
InitNetMsg(&msg, buf, sizeof(buf));
|
InitNetMsg(&msg, buf, sizeof(buf));
|
||||||
|
|
||||||
WriteByte(&msg, svc_print);
|
WriteByte(&msg, svc_print);
|
||||||
WriteByte(&msg, 3); //PRINT_CHAT
|
WriteByte(&msg, 3); //PRINT_CHAT
|
||||||
WriteString2(&msg, v->name);
|
WriteString2(&msg, v->name);
|
||||||
WriteString2(&msg, "\x8d ");
|
WriteString2(&msg, "\x8d ");
|
||||||
WriteString2(&msg, message);
|
WriteString2(&msg, message);
|
||||||
WriteString(&msg, "\n");
|
WriteString(&msg, "\n");
|
||||||
|
|
||||||
Broadcast(cluster, msg.data, msg.cursize);
|
Broadcast(cluster, msg.data, msg.cursize);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1461,7 +1469,7 @@ void ParseQWC(cluster_t *cluster, sv_t *qtv, viewer_t *v, netmsg_t *m)
|
||||||
else if (!strncmp(buf, "ison", 4))
|
else if (!strncmp(buf, "ison", 4))
|
||||||
{
|
{
|
||||||
viewer_t *other;
|
viewer_t *other;
|
||||||
if ((other = QW_IsOn(qtv->cluster, buf+5)))
|
if ((other = QW_IsOn(cluster, buf+5)))
|
||||||
{
|
{
|
||||||
if (!other->server)
|
if (!other->server)
|
||||||
QW_PrintfToViewer(v, "%s is on the proxy, but not yet watching a game\n");
|
QW_PrintfToViewer(v, "%s is on the proxy, but not yet watching a game\n");
|
||||||
|
|
Loading…
Reference in a new issue