mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-03-27 12:51:13 +00:00
Fixed logging of clients IP addresses.
This commit is contained in:
parent
b2a65b9af3
commit
11b504ef31
3 changed files with 15 additions and 17 deletions
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.53 2002/06/23 23:32:29 jbravo
|
||||
// Fixed logging of clients IP addresses.
|
||||
//
|
||||
// Revision 1.52 2002/06/16 20:06:13 jbravo
|
||||
// Reindented all the source files with "indent -kr -ut -i8 -l120 -lc120 -sob -bad -bap"
|
||||
//
|
||||
|
@ -739,6 +742,7 @@ void CG_InitConsoleCommands(void)
|
|||
trap_AddCommand("playerlist");
|
||||
// JBravo: ignore
|
||||
trap_AddCommand("ignorenum");
|
||||
trap_AddCommand("unignorenum");
|
||||
trap_AddCommand("ignore");
|
||||
trap_AddCommand("unignore");
|
||||
trap_AddCommand("clearignorelist");
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.100 2002/06/23 23:32:29 jbravo
|
||||
// Fixed logging of clients IP addresses.
|
||||
//
|
||||
// Revision 1.99 2002/06/21 11:55:32 freud
|
||||
// Changed spawning system to move spawns up 9 pixels (q3 style)
|
||||
//
|
||||
|
@ -1319,7 +1322,7 @@ char *ClientConnect(int clientNum, qboolean firstTime, qboolean isBot)
|
|||
{
|
||||
char *value, *ip;
|
||||
gclient_t *client;
|
||||
char userinfo[MAX_INFO_STRING];
|
||||
char userinfo[MAX_INFO_STRING], ipaddr[64];
|
||||
gentity_t *ent;
|
||||
|
||||
ent = &g_entities[clientNum];
|
||||
|
@ -1327,6 +1330,7 @@ char *ClientConnect(int clientNum, qboolean firstTime, qboolean isBot)
|
|||
|
||||
// check to see if they are on the banned IP list
|
||||
ip = Info_ValueForKey(userinfo, "ip");
|
||||
strcpy(ipaddr, ip);
|
||||
if (G_FilterPacket(ip)) {
|
||||
return "Banned.";
|
||||
}
|
||||
|
@ -1365,10 +1369,6 @@ char *ClientConnect(int clientNum, qboolean firstTime, qboolean isBot)
|
|||
return "BotConnectfailed";
|
||||
}
|
||||
}
|
||||
// get and distribute relevent paramters
|
||||
// JBravo: make this more like AQ. Moved it down a bit.
|
||||
// G_LogPrintf( "ClientConnect: %i\n", clientNum );
|
||||
|
||||
// slicer : make sessionTeam = to savedTeam for scoreboard on cgame
|
||||
// JBravo: only for teamplay. Could break DM
|
||||
if (g_gametype.integer == GT_TEAMPLAY) {
|
||||
|
@ -1380,7 +1380,7 @@ char *ClientConnect(int clientNum, qboolean firstTime, qboolean isBot)
|
|||
// don't do the "xxx connected" messages if they were caried over from previous level
|
||||
if (firstTime) {
|
||||
trap_SendServerCommand(-1, va("print \"%s" S_COLOR_WHITE " connected\n\"", client->pers.netname));
|
||||
G_LogPrintf("%s@%s connected (clientNum %i)\n", client->pers.netname, ip, clientNum);
|
||||
G_LogPrintf("%s@%s connected (clientNum %i)\n", client->pers.netname, ipaddr, clientNum);
|
||||
}
|
||||
|
||||
if (g_gametype.integer >= GT_TEAM && g_gametype.integer != GT_TEAMPLAY &&
|
||||
|
@ -1404,17 +1404,6 @@ char *ClientConnect(int clientNum, qboolean firstTime, qboolean isBot)
|
|||
// JBravo: moved from ClientBegin
|
||||
client->pers.enterTime = level.time;
|
||||
|
||||
//Blaze: Send out the breakable names to the clients
|
||||
//Blaze: moved to configstring
|
||||
//if (!isBot && G_SendBreakableInfo(clientNum))
|
||||
//{
|
||||
// Com_Printf("Error sending breakable info to client\n");
|
||||
//}
|
||||
// for statistics
|
||||
// client->areabits = areabits;
|
||||
// if ( !client->areabits )
|
||||
// client->areabits = G_Alloc( (trap_AAS_PointReachabilityAreaIndex( NULL ) + 7) / 8 );
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.144 2002/06/23 23:32:29 jbravo
|
||||
// Fixed logging of clients IP addresses.
|
||||
//
|
||||
// Revision 1.143 2002/06/23 21:44:08 jbravo
|
||||
// Fixed shots fired stats for non TP modes and some cleanups
|
||||
//
|
||||
|
@ -3179,6 +3182,8 @@ void ClientCommand(int clientNum)
|
|||
// JBravo: adding ignore
|
||||
else if (Q_stricmp(cmd, "ignorenum") == 0)
|
||||
Cmd_Ignorenum_f(ent);
|
||||
else if (Q_stricmp(cmd, "unignorenum") == 0)
|
||||
Cmd_Ignorenum_f(ent);
|
||||
else if (Q_stricmp(cmd, "ignore") == 0)
|
||||
Cmd_Ignore_f(ent);
|
||||
else if (Q_stricmp(cmd, "unignore") == 0)
|
||||
|
|
Loading…
Reference in a new issue