mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-01-19 08:01:55 +00:00
Added unignore
This commit is contained in:
parent
121cdc11b8
commit
d9253a6642
5 changed files with 52 additions and 1 deletions
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.48 2002/05/12 16:10:19 jbravo
|
||||
// Added unignore
|
||||
//
|
||||
// Revision 1.47 2002/05/12 12:14:14 slicer
|
||||
// Added Referee command for captains
|
||||
//
|
||||
|
@ -991,6 +994,7 @@ void CG_InitConsoleCommands( void ) {
|
|||
trap_AddCommand ("tkok");
|
||||
// JBravo: ignore
|
||||
trap_AddCommand ("ignore");
|
||||
trap_AddCommand ("unignore");
|
||||
trap_AddCommand ("ignorenum");
|
||||
trap_AddCommand ("clearignorelist");
|
||||
// Slicer: Matchmode
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.109 2002/05/12 16:10:19 jbravo
|
||||
// Added unignore
|
||||
//
|
||||
// Revision 1.108 2002/05/12 12:15:05 slicer
|
||||
// Added Referee command for captains
|
||||
//
|
||||
|
@ -2944,6 +2947,8 @@ void ClientCommand( int clientNum ) {
|
|||
Cmd_Ignorenum_f (ent);
|
||||
else if (Q_stricmp (cmd, "ignore") == 0)
|
||||
Cmd_Ignore_f (ent);
|
||||
else if (Q_stricmp (cmd, "unignore") == 0)
|
||||
Cmd_Unignore_f (ent);
|
||||
else if (Q_stricmp (cmd, "clearignorelist") == 0)
|
||||
Cmd_Ignoreclear_f (ent);
|
||||
// JBravo: adding tkok
|
||||
|
|
|
@ -13,4 +13,4 @@ qboolean Ref_Exists( void );
|
|||
qboolean Ref_Auth( gentity_t *); // No need to return a boolean in this context
|
||||
void Ref_Command ( gentity_t * );
|
||||
void Ref_Resign ( gentity_t * );
|
||||
extern int refVotes[2];
|
||||
extern int refVotes[2];
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.89 2002/05/12 16:10:19 jbravo
|
||||
// Added unignore
|
||||
//
|
||||
// Revision 1.88 2002/05/12 00:07:47 slicer
|
||||
// Added Normal Radio Flood Protection
|
||||
//
|
||||
|
@ -2020,8 +2023,43 @@ void Cmd_Ignore_f (gentity_t *self) {
|
|||
trap_SendServerCommand(self-g_entities, va("print \"Usage: ignore <playername>.\n\""));
|
||||
return;
|
||||
}
|
||||
|
||||
trap_Argv(1, s, sizeof(s));
|
||||
target = FindClientByPersName (s);
|
||||
i = IsInIgnoreList (self, target);
|
||||
if (i) {
|
||||
trap_SendServerCommand(self-g_entities, va("print \"%s is already on your ignorelist.\n\"", s));
|
||||
return;
|
||||
}
|
||||
if (target && target != self) {
|
||||
if (level.framenum > (self->client->sess.ignore_time + 50))
|
||||
RQ3_AddOrDelIgnoreSubject (self, target, qfalse);
|
||||
else {
|
||||
trap_SendServerCommand(self-g_entities, va("print \"Wait 5 seconds before ignoring again.\n\""));
|
||||
return;
|
||||
}
|
||||
} else
|
||||
trap_SendServerCommand(self-g_entities, va("print \"Use ignorelist to see who can be ignored.\n\""));
|
||||
}
|
||||
|
||||
void Cmd_Unignore_f (gentity_t *self) {
|
||||
gentity_t *target;
|
||||
char s[128];
|
||||
int i;
|
||||
|
||||
i = trap_Argc ();
|
||||
if (i < 2) {
|
||||
trap_SendServerCommand(self-g_entities, va("print \"Usage: unignore <playername>.\n\""));
|
||||
return;
|
||||
}
|
||||
|
||||
trap_Argv(1, s, sizeof(s));
|
||||
target = FindClientByPersName (s);
|
||||
i = IsInIgnoreList (self, target);
|
||||
if (!i) {
|
||||
trap_SendServerCommand(self-g_entities, va("print \"%s is not on your ignore list..\n\"", s));
|
||||
return;
|
||||
}
|
||||
if (target && target != self) {
|
||||
if (level.framenum > (self->client->sess.ignore_time + 50))
|
||||
RQ3_AddOrDelIgnoreSubject (self, target, qfalse);
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.16 2002/05/12 16:10:19 jbravo
|
||||
// Added unignore
|
||||
//
|
||||
// Revision 1.15 2002/05/10 04:06:27 jbravo
|
||||
// Added Ignore
|
||||
//
|
||||
|
@ -95,6 +98,7 @@ void RQ3_Cmd_Stuff(void);
|
|||
void Add_TeamWound(gentity_t *attacker, gentity_t *victim, int mod);
|
||||
void setFFState(gentity_t *ent);
|
||||
void Cmd_Ignore_f(gentity_t *ent);
|
||||
void Cmd_Unignore_f(gentity_t *ent);
|
||||
void Cmd_Ignorenum_f(gentity_t *ent);
|
||||
void Cmd_Ignoreclear_f(gentity_t *ent);
|
||||
int IsInIgnoreList(gentity_t *source, gentity_t *subject);
|
||||
|
|
Loading…
Reference in a new issue