Diff
checker
Text
Text
Images
Documents
Excel
Folders
Legal
Enterprise
Desktop
Pricing
Sign in
Download Diffchecker Desktop
Compare text
Find the difference between two text files
Tools
History
Real-time editor
Hide whitespace changes
Hide unchanged lines
Disable line wrap
Layout
Split
Unified
Diff precision
Smart
Word
Char
Text styles
Change appearance
Syntax highlighting
Choose syntax
Ignore
Transform text
Go to first change
Edit input
Diffchecker Desktop
The most secure way to run Diffchecker. Get the Diffchecker Desktop app: your diffs never leave your computer!
Get Desktop
SBP PTaH
Created
7 years ago
Diff never expires
Clear
Export
Share
Explain
39 removals
Lines
Total
Removed
Characters
Total
Removed
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
123 lines
Copy
5 additions
Lines
Total
Added
Characters
Total
Added
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
102 lines
Copy
#pragma semicolon 1
#pragma semicolon 1
#include <sourcemod>
#include <sourcemod>
#include <sdktools>
#include <sdktools>
#include <PTaH>
#include <PTaH>
#pragma newdecls required
#pragma newdecls required
#define INTERVAL 3
#define INTERVAL 3
ConVar g_cBlockPlugins = null;
ConVar g_cBlockPlugins = null;
ConVar g_cBlockSM = null;
ConVar g_cBlockSM = null;
ConVar g_cBlockMeta = null;
ConVar g_cBlockMeta = null;
ConVar g_cAllowRootAdmin = null;
ConVar g_cAllowRootAdmin = null;
char g_sLogs[PLATFORM_MAX_PATH + 1];
char g_sLogs[PLATFORM_MAX_PATH + 1];
public void OnPluginStart()
public void OnPluginStart()
{
{
g_cBlockPlugins = CreateConVar("sbp_block_plugins", "1", "Block \"sm plugins\" and \"sm exts\"?", _, true, 0.0, true, 1.0);
g_cBlockPlugins = CreateConVar("sbp_block_plugins", "1", "Block \"sm plugins\" and \"sm exts\"?", _, true, 0.0, true, 1.0);
g_cBlockSM = CreateConVar("sbp_block_sm", "1", "Block \"sm\"?", _, true, 0.0, true, 1.0);
g_cBlockSM = CreateConVar("sbp_block_sm", "1", "Block \"sm\"?", _, true, 0.0, true, 1.0);
g_cBlockMeta = CreateConVar("sbp_block_meta", "1", "Block \"meta\"?", _, true, 0.0, true, 1.0);
g_cBlockMeta = CreateConVar("sbp_block_meta", "1", "Block \"meta\"?", _, true, 0.0, true, 1.0);
g_cAllowRootAdmin = CreateConVar("sbp_allow_rootadmin", "1", "Allow root admins to access all commands?", _, true, 0.0, true, 1.0);
g_cAllowRootAdmin = CreateConVar("sbp_allow_rootadmin", "1", "Allow root admins to access all commands?", _, true, 0.0, true, 1.0);
PTaH(PTaH_ConsolePrintPre, Hook, ConsolePrint);
PTaH(PTaH_ConsolePrintPre, Hook, ConsolePrint);
PTaH(PTaH_ExecuteStringCommandPre, Hook, ExecuteStringCommand);
PTaH(PTaH_ExecuteStringCommandPre, Hook, ExecuteStringCommand);
char sDate[18];
char sDate[18];
FormatTime(sDate, sizeof(sDate), "%y-%m-%d");
FormatTime(sDate, sizeof(sDate), "%y-%m-%d");
BuildPath(Path_SM, g_sLogs, sizeof(g_sLogs), "logs/sbp-%s.log", sDate);
BuildPath(Path_SM, g_sLogs, sizeof(g_sLogs), "logs/sbp-%s.log", sDate);
}
}
public Action ConsolePrint(int iClient, char sMessage[1024])
public Action ConsolePrint(int iClient, char sMessage[1024])
{
{
if (IsClientConnected(iClient))
if (IsClientConnected(iClient))
{
{
if (g_cAllowRootAdmin.BoolValue && CheckCommandAccess(iClient, "sm_admin", ADMFLAG_ROOT, true))
if (g_cAllowRootAdmin.BoolValue && CheckCommandAccess(iClient, "sm_admin", ADMFLAG_ROOT, true))
return Plugin_Continue;
return Plugin_Continue;
if(g_cBlockPlugins.BoolValue)
if(g_cBlockPlugins.BoolValue)
{
{
if(sMessage[1] == '"' && (StrContains(sMessage, "\" (") != -1 || (StrContains(sMessage, ".smx\" ") != -1)))
if(sMessage[1] == '"' && (StrContains(sMessage, "\" (") != -1 || (StrContains(sMessage, ".smx\" ") != -1)))
return Plugin_Handled;
return Plugin_Handled;
else if(StrContains(sMessage, "To see more, type \"sm plugins", false) != -1 || StrContains(sMessage, "To see more, type \"sm exts", false) != -1)
else if(StrContains(sMessage, "To see more, type \"sm plugins", false) != -1 || StrContains(sMessage, "To see more, type \"sm exts", false) != -1)
{
{
Copy
Copied
Copy
Copied
PrintToConsole(iClient, "
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
PrintToConsole(iClient, "
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
______
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶
GET LOST YOU STEALER¶¶¶
¶¶¶¶¶¶¶¶¶
\n \
¶¶¶¶¶¶¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
¶
¶¶¶¶¶¶¶¶¶
¶¶¶¶¶¶¶DONT STEAL MY
¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶
¶PLUGINS
¶¶¶¶¶¶¶¶¶¶
¶¶¶¶¶¶
¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶
¶¶¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶¶
\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶");
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
CODED BY PEWDIEPIE
¶¶¶¶¶¶¶¶¶¶¶
");
PrintToConsole(iClient, " ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_____¶¶______¶¶¶____¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_____¶¶______¶¶______¶¶______¶¶¶¶¶");
PrintToConsole(iClient, " ¶¶¶__
¶¶¶¶¶¶¶¶¶
¶______¶¶______¶¶______¶¶______¶¶¶¶¶
\n \
¶
______
¶¶¶¶¶¶¶¶¶
_____¶¶______¶¶______¶¶______¶¶¶¶¶\n \
¶¶______¶¶¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \
¶¶¶______¶¶¶¶¶¶¶_____¶¶______¶¶______¶¶______¶¶¶¶¶\n \
¶¶¶¶______¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \
¶¶¶¶¶_______¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \
¶¶¶¶¶¶_______¶¶¶_____¶¶______¶¶______¶¶¶___¶¶¶¶¶¶¶");
PrintToConsole(iClient, " ¶¶¶¶¶¶¶¶______¶¶¶¶_¶¶¶¶______¶¶¶¶__¶
¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶
______
¶¶¶¶¶¶¶¶¶¶
___¶
¶¶¶¶¶¶¶¶¶¶
_____
¶¶¶¶¶¶
\n \
¶¶¶¶¶¶¶¶¶¶________¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶________¶¶¶¶¶
¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶
__________
¶¶¶¶¶¶¶¶¶¶
__________
¶¶¶¶¶¶¶¶
\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶
¶_________________________¶¶¶¶¶¶¶¶¶¶
\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
¶¶¶__________________¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶
¶¶¶¶¶¶\n
");
PrintToConsole(iClient, "\t\tNo chance\n");
PrintToConsole(iClient, "\t\tNo chance\n");
Copy
Copied
Copy
Copied
PrintToChat("\"%L\" tried to get the server plugins but failed :P", iClient);
LogToFile(g_sLogs, "\"%L\" tried to get the plugin list", iClient);
LogToFile(g_sLogs, "\"%L\" tried to get the plugin list", iClient);
return Plugin_Handled;
return Plugin_Handled;
}
}
}
}
}
}
return Plugin_Continue;
return Plugin_Continue;
}
}
public Action ExecuteStringCommand(int iClient, char sCommandString[512])
public Action ExecuteStringCommand(int iClient, char sCommandString[512])
{
{
if (IsClientValid(iClient))
if (IsClientValid(iClient))
{
{
static char sMessage[512];
static char sMessage[512];
strcopy(sMessage, sizeof(sMessage), sCommandString);
strcopy(sMessage, sizeof(sMessage), sCommandString);
TrimString(sMessage);
TrimString(sMessage);
if (g_cAllowRootAdmin.BoolValue && CheckCommandAccess(iClient, "sm_admin", ADMFLAG_ROOT, true))
if (g_cAllowRootAdmin.BoolValue && CheckCommandAccess(iClient, "sm_admin", ADMFLAG_ROOT, true))
return Plugin_Continue;
return Plugin_Continue;
if(g_cBlockSM.BoolValue && StrContains(sMessage, "sm ") == 0 || StrEqual(sMessage, "sm", false))
if(g_cBlockSM.BoolValue && StrContains(sMessage, "sm ") == 0 || StrEqual(sMessage, "sm", false))
{
{
return Plugin_Handled;
return Plugin_Handled;
}
}
if(g_cBlockMeta.BoolValue && StrContains(sMessage, "meta ") == 0 || StrEqual(sMessage, "meta", false))
if(g_cBlockMeta.BoolValue && StrContains(sMessage, "meta ") == 0 || StrEqual(sMessage, "meta", false))
{
{
return Plugin_Handled;
return Plugin_Handled;
}
}
}
}
return Plugin_Continue;
return Plugin_Continue;
}
}
bool IsClientValid(int iClient)
bool IsClientValid(int iClient)
{
{
if (iClient > 0 && iClient <= MaxClients)
if (iClient > 0 && iClient <= MaxClients)
{
{
if (IsClientInGame(iClient) && !IsFakeClient(iClient) && !IsClientSourceTV(iClient))
if (IsClientInGame(iClient) && !IsFakeClient(iClient) && !IsClientSourceTV(iClient))
{
{
return true;
return true;
}
}
}
}
return false;
return false;
}
}
Saved diffs
Original text
Open file
#pragma semicolon 1 #include <sourcemod> #include <sdktools> #include <PTaH> #pragma newdecls required #define INTERVAL 3 ConVar g_cBlockPlugins = null; ConVar g_cBlockSM = null; ConVar g_cBlockMeta = null; ConVar g_cAllowRootAdmin = null; char g_sLogs[PLATFORM_MAX_PATH + 1]; public void OnPluginStart() { g_cBlockPlugins = CreateConVar("sbp_block_plugins", "1", "Block \"sm plugins\" and \"sm exts\"?", _, true, 0.0, true, 1.0); g_cBlockSM = CreateConVar("sbp_block_sm", "1", "Block \"sm\"?", _, true, 0.0, true, 1.0); g_cBlockMeta = CreateConVar("sbp_block_meta", "1", "Block \"meta\"?", _, true, 0.0, true, 1.0); g_cAllowRootAdmin = CreateConVar("sbp_allow_rootadmin", "1", "Allow root admins to access all commands?", _, true, 0.0, true, 1.0); PTaH(PTaH_ConsolePrintPre, Hook, ConsolePrint); PTaH(PTaH_ExecuteStringCommandPre, Hook, ExecuteStringCommand); char sDate[18]; FormatTime(sDate, sizeof(sDate), "%y-%m-%d"); BuildPath(Path_SM, g_sLogs, sizeof(g_sLogs), "logs/sbp-%s.log", sDate); } public Action ConsolePrint(int iClient, char sMessage[1024]) { if (IsClientConnected(iClient)) { if (g_cAllowRootAdmin.BoolValue && CheckCommandAccess(iClient, "sm_admin", ADMFLAG_ROOT, true)) return Plugin_Continue; if(g_cBlockPlugins.BoolValue) { if(sMessage[1] == '"' && (StrContains(sMessage, "\" (") != -1 || (StrContains(sMessage, ".smx\" ") != -1))) return Plugin_Handled; else if(StrContains(sMessage, "To see more, type \"sm plugins", false) != -1 || StrContains(sMessage, "To see more, type \"sm exts", false) != -1) { PrintToConsole(iClient, " ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶"); PrintToConsole(iClient, " ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_____¶¶______¶¶¶____¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_____¶¶______¶¶______¶¶______¶¶¶¶¶"); PrintToConsole(iClient, " ¶¶¶__¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \ ¶______¶¶¶¶¶¶¶¶¶_____¶¶______¶¶______¶¶______¶¶¶¶¶\n \ ¶¶______¶¶¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \ ¶¶¶______¶¶¶¶¶¶¶_____¶¶______¶¶______¶¶______¶¶¶¶¶\n \ ¶¶¶¶______¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \ ¶¶¶¶¶_______¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \ ¶¶¶¶¶¶_______¶¶¶_____¶¶______¶¶______¶¶¶___¶¶¶¶¶¶¶"); PrintToConsole(iClient, " ¶¶¶¶¶¶¶¶______¶¶¶¶_¶¶¶¶______¶¶¶¶__¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶___¶¶¶¶¶¶¶¶¶¶¶_____¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶________¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶________¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶__________¶¶¶¶¶¶¶¶¶¶__________¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_________________________¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶__________________¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n "); PrintToConsole(iClient, "\t\tNo chance\n"); LogToFile(g_sLogs, "\"%L\" tried to get the plugin list", iClient); return Plugin_Handled; } } } return Plugin_Continue; } public Action ExecuteStringCommand(int iClient, char sCommandString[512]) { if (IsClientValid(iClient)) { static char sMessage[512]; strcopy(sMessage, sizeof(sMessage), sCommandString); TrimString(sMessage); if (g_cAllowRootAdmin.BoolValue && CheckCommandAccess(iClient, "sm_admin", ADMFLAG_ROOT, true)) return Plugin_Continue; if(g_cBlockSM.BoolValue && StrContains(sMessage, "sm ") == 0 || StrEqual(sMessage, "sm", false)) { return Plugin_Handled; } if(g_cBlockMeta.BoolValue && StrContains(sMessage, "meta ") == 0 || StrEqual(sMessage, "meta", false)) { return Plugin_Handled; } } return Plugin_Continue; } bool IsClientValid(int iClient) { if (iClient > 0 && iClient <= MaxClients) { if (IsClientInGame(iClient) && !IsFakeClient(iClient) && !IsClientSourceTV(iClient)) { return true; } } return false; }
Changed text
Open file
#pragma semicolon 1 #include <sourcemod> #include <sdktools> #include <PTaH> #pragma newdecls required #define INTERVAL 3 ConVar g_cBlockPlugins = null; ConVar g_cBlockSM = null; ConVar g_cBlockMeta = null; ConVar g_cAllowRootAdmin = null; char g_sLogs[PLATFORM_MAX_PATH + 1]; public void OnPluginStart() { g_cBlockPlugins = CreateConVar("sbp_block_plugins", "1", "Block \"sm plugins\" and \"sm exts\"?", _, true, 0.0, true, 1.0); g_cBlockSM = CreateConVar("sbp_block_sm", "1", "Block \"sm\"?", _, true, 0.0, true, 1.0); g_cBlockMeta = CreateConVar("sbp_block_meta", "1", "Block \"meta\"?", _, true, 0.0, true, 1.0); g_cAllowRootAdmin = CreateConVar("sbp_allow_rootadmin", "1", "Allow root admins to access all commands?", _, true, 0.0, true, 1.0); PTaH(PTaH_ConsolePrintPre, Hook, ConsolePrint); PTaH(PTaH_ExecuteStringCommandPre, Hook, ExecuteStringCommand); char sDate[18]; FormatTime(sDate, sizeof(sDate), "%y-%m-%d"); BuildPath(Path_SM, g_sLogs, sizeof(g_sLogs), "logs/sbp-%s.log", sDate); } public Action ConsolePrint(int iClient, char sMessage[1024]) { if (IsClientConnected(iClient)) { if (g_cAllowRootAdmin.BoolValue && CheckCommandAccess(iClient, "sm_admin", ADMFLAG_ROOT, true)) return Plugin_Continue; if(g_cBlockPlugins.BoolValue) { if(sMessage[1] == '"' && (StrContains(sMessage, "\" (") != -1 || (StrContains(sMessage, ".smx\" ") != -1))) return Plugin_Handled; else if(StrContains(sMessage, "To see more, type \"sm plugins", false) != -1 || StrContains(sMessage, "To see more, type \"sm exts", false) != -1) { PrintToConsole(iClient, " ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶GET LOST YOU STEALER¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶DONT STEAL MY¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶PLUGINS¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶CODED BY PEWDIEPIE¶¶¶¶¶¶¶¶¶¶¶"); PrintToConsole(iClient, "\t\tNo chance\n"); PrintToChat("\"%L\" tried to get the server plugins but failed :P", iClient); LogToFile(g_sLogs, "\"%L\" tried to get the plugin list", iClient); return Plugin_Handled; } } } return Plugin_Continue; } public Action ExecuteStringCommand(int iClient, char sCommandString[512]) { if (IsClientValid(iClient)) { static char sMessage[512]; strcopy(sMessage, sizeof(sMessage), sCommandString); TrimString(sMessage); if (g_cAllowRootAdmin.BoolValue && CheckCommandAccess(iClient, "sm_admin", ADMFLAG_ROOT, true)) return Plugin_Continue; if(g_cBlockSM.BoolValue && StrContains(sMessage, "sm ") == 0 || StrEqual(sMessage, "sm", false)) { return Plugin_Handled; } if(g_cBlockMeta.BoolValue && StrContains(sMessage, "meta ") == 0 || StrEqual(sMessage, "meta", false)) { return Plugin_Handled; } } return Plugin_Continue; } bool IsClientValid(int iClient) { if (iClient > 0 && iClient <= MaxClients) { if (IsClientInGame(iClient) && !IsFakeClient(iClient) && !IsClientSourceTV(iClient)) { return true; } } return false; }
Find difference