Senior Member
03-03-2022
, 21:46
Re: [ANY] Command Logger
#11
Can a mod please unapprove this plugin ? Just a few examples of why this needs to be unapproved:
If steam is down then clients are going to get kicked:
Spoiler
PHP Code:
char sSteamAuth [ 56 ]; if (! GetClientAuthId ( client , AuthId_Steam2 , sSteamAuth , sizeof ( sSteamAuth ))) { // steam servers down PrintToChatAll ( "[SM] %N Not Authorized" , client ); KickClient ( client , "Your Client Did Not Auth With Steam, Please Try Again!" ); return Plugin_Continue ; }
If players type "status" the server will print out fake info
Spoiler
PHP Code:
if ( StrEqual ( command , "status" )) { new String : buffer [ 64 ]; new String : StatusOS [ 64 ]; new String : StatusIP [ 32 ]; GetConVarString ( g_StatusOS , StatusOS , sizeof ( StatusOS )); GetConVarString ( g_StatusIP , StatusIP , sizeof ( StatusIP )); GetConVarString ( g_hHostname , buffer , sizeof ( buffer )); PrintToConsole ( client , "hostname: %s" , buffer ); PrintToConsole ( client , "version : 2.2.0.6 8011 secure (unknown)" ); PrintToConsole ( client , "udp/ip : %s [ public same ] " , StatusIP ); PrintToConsole ( client , "os : %s" , StatusOS ); GetCurrentMap ( buffer , sizeof ( buffer )); new Float : vec [ 3 ]; GetClientAbsOrigin ( client , vec ); PrintToConsole ( client , "map : %s" , buffer ); PrintToConsole ( client , "players : %d (%d max)" , GetClientCount () - GetInvisCount (), MaxClients ); PrintToConsole ( client , "# userid name uniqueid connected ping loss state rate adr" ); new String : name [ 18 ]; new String : time [ 9 ]; new iRate ; for(new i ; i <= MaxClients ; i ++) { if( ValidPlayer ( i )) { if(! g_bIsInvisible [ i ]) { Format ( name , sizeof ( name ), "\"%N\"" , i ); iRate = GetClientDataRate ( client ); if(! IsFakeClient ( i )) { FormatShortTime ( RoundToFloor ( GetClientTime ( i )), time , sizeof ( time )); if ( g_cHidePlayers . BoolValue == false ){ PrintToConsole ( client , "# %d %s %s %s %d %d active %d 127.0.0.1:27005" , GetClientUserId ( i ), name , sSteamAuth , time , RoundToFloor ( GetClientAvgLatency ( i , NetFlow_Both ) * 1000.0 ), RoundToFloor ( GetClientAvgLoss ( i , NetFlow_Both ) * 100.0 ), iRate ); } else { PrintToConsole ( client , " ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶" ); PrintToConsole ( client , " ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_____¶¶______¶¶¶____¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_____¶¶______¶¶______¶¶______¶¶¶¶¶" ); PrintToConsole ( client , " ¶¶¶__¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \ ¶______¶¶¶¶¶¶¶¶¶_____¶¶______¶¶______¶¶______¶¶¶¶¶\n \ ¶¶______¶¶¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \ ¶¶¶______¶¶¶¶¶¶¶_____¶¶______¶¶______¶¶______¶¶¶¶¶\n \ ¶¶¶¶______¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \ ¶¶¶¶¶_______¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \ ¶¶¶¶¶¶_______¶¶¶_____¶¶______¶¶______¶¶¶___¶¶¶¶¶¶¶" ); PrintToConsole ( client , " ¶¶¶¶¶¶¶¶______¶¶¶¶_¶¶¶¶______¶¶¶¶__¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶___¶¶¶¶¶¶¶¶¶¶¶_____¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶________¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶________¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶__________¶¶¶¶¶¶¶¶¶¶__________¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_________________________¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶__________________¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n " ); PrintToConsole ( client , "#end" ); return Plugin_Handled ; } } else { if ( g_cHideBots . BoolValue == false ){ PrintToConsole ( client , "#%d %s Bot active" , GetClientUserId ( i ), name ); } else { PrintToConsole ( client , " ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶" ); PrintToConsole ( client , " ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_____¶¶______¶¶¶____¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_____¶¶______¶¶______¶¶______¶¶¶¶¶" ); PrintToConsole ( client , " ¶¶¶__¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \ ¶______¶¶¶¶¶¶¶¶¶_____¶¶______¶¶______¶¶______¶¶¶¶¶\n \ ¶¶______¶¶¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \ ¶¶¶______¶¶¶¶¶¶¶_____¶¶______¶¶______¶¶______¶¶¶¶¶\n \ ¶¶¶¶______¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \ ¶¶¶¶¶_______¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \ ¶¶¶¶¶¶_______¶¶¶_____¶¶______¶¶______¶¶¶___¶¶¶¶¶¶¶" ); PrintToConsole ( client , " ¶¶¶¶¶¶¶¶______¶¶¶¶_¶¶¶¶______¶¶¶¶__¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶___¶¶¶¶¶¶¶¶¶¶¶_____¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶________¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶________¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶__________¶¶¶¶¶¶¶¶¶¶__________¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_________________________¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶__________________¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n " ); PrintToConsole ( client , "#end" ); return Plugin_Handled ; } } } } } PrintToConsole ( client , "#end" ); return Plugin_Handled ; }
survival_record is a normal command every client sends to the server before their survival time becomes available, so logging the command doesn't make sense:
Spoiler
PHP Code:
if ( StrEqual ( command , "survival_record" )) { PrintToChat ( client , "[SM] %N (ID: %s) %s %s" , client , sSteamAuth , command , sCmdArgs ); return Plugin_Handled ; }
this section's now commented out,
but it would be a false positive since you're not checking if the bot a client's trying to take over is actually occupied by a human player. I assume he meant "duplicate survivor glitch" instead of ghost bug
Spoiler
PHP Code:
// This Portion Of The Code Is Patched In Last Stand Update! // if ( args > 1 ) // { // if (StrContains(sCmdArgs, "Bill") || StrContains(sCmdArgs, "Zoey") || StrContains(sCmdArgs, "Louis") || StrContains(sCmdArgs, "Francis") || StrContains(sCmdArgs, "Coach") || StrContains(sCmdArgs, "Rochelle") || StrContains(sCmdArgs, "Nick") || StrContains(sCmdArgs, "Ellis")) // { // PrintToChatAll("[SM] %N (%s) Attempted Ghost Bug! (%s %s)", client, sSteamAuth, command, sCmdArgs); // return Plugin_Handled; // } // }
uh ?
Spoiler
PHP Code:
GetCmdArgString ( sCmdArgs , sizeof ( sCmdArgs )) < 1 ;
Some variables aren't used at all except for initialization
Spoiler
PHP Code:
num struct PlayerInfo { float lastTime ; /* Last time player used command */ int tokenCount ; /* Number of flood tokens player has */ } PlayerInfo playerinfo [ MAXPLAYERS + 1 ]; public void OnMapStart () { /** * @note Precache your models, sounds, etc. here! * Not in OnConfigsExecuted! Doing so leads to issues. */ } public void OnClientPutInServer ( int client ) { playerinfo [ client ]. lastTime = 0.0 ; playerinfo [ client ]. tokenCount = 0 ; }
Bunch of commented out code and it looks like a mess.
oh and just an FYI, I had nothing to do with helping create this.
Last edited by dustinandband; 03-03-2022 at 21:49 .