mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-21 18:01:15 +00:00
First part of chat info support.
The idea is to allow other clients know when the player is chatting, fiddling with the console, etc.
This commit is contained in:
parent
a3fe8d56b8
commit
52146947c1
3 changed files with 19 additions and 3 deletions
|
@ -38,5 +38,6 @@ void CL_Chat_User_Disconnected (int uid);
|
|||
void CL_Chat_Check_Name (const char *name, int slot);
|
||||
void CL_Chat_Flush_Ignores (void);
|
||||
void CL_Chat_Init (void);
|
||||
void CL_ChatInfo (int val);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -136,6 +136,7 @@ typedef struct {
|
|||
|
||||
// private userinfo for sending to masterless servers
|
||||
struct info_s *userinfo;
|
||||
int chat;
|
||||
|
||||
// file transfer from server
|
||||
QFile *download;
|
||||
|
|
|
@ -35,11 +35,14 @@
|
|||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#include "QF/info.h"
|
||||
#include "QF/dstring.h"
|
||||
#include "QF/llist.h"
|
||||
#include "QF/cbuf.h"
|
||||
#include "QF/cmd.h"
|
||||
#include "QF/dstring.h"
|
||||
#include "QF/info.h"
|
||||
#include "QF/llist.h"
|
||||
#include "QF/sys.h"
|
||||
#include "QF/va.h"
|
||||
|
||||
#include "client.h"
|
||||
#include "cl_chat.h"
|
||||
|
||||
|
@ -231,3 +234,14 @@ CL_Chat_Init (void)
|
|||
Cmd_AddCommand ("ignore", CL_Ignore_f, "Ignores chat and name-change messages from a user.");
|
||||
Cmd_AddCommand ("unignore", CL_Unignore_f, "Removes a previously ignored user from the ignore list.");
|
||||
}
|
||||
|
||||
void
|
||||
CL_ChatInfo (int val)
|
||||
{
|
||||
if (val < 1 || val > 3)
|
||||
val = 0;
|
||||
if (cls.chat != val) {
|
||||
cls.chat = val;
|
||||
Cbuf_AddText(cl_cbuf, va ("setinfo chat \"%d\"\n", val));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue