diff --git a/FSB_BanSystem/fsb.sp b/FSB_BanSystem/fsb.sp index 6a7d3e5..6778c75 100644 --- a/FSB_BanSystem/fsb.sp +++ b/FSB_BanSystem/fsb.sp @@ -24,7 +24,7 @@ #endif -#define PLUGIN_VERSION "3.0" +#define PLUGIN_VERSION "3.1" public Plugin:myinfo = { name = "Facti13 System Browser", author = "gsd", @@ -48,6 +48,11 @@ public OnPluginStart() { MuteSetup(); #endif + #if defined _ban_module + HookEvent("player_connect", EventConnect); + HookEvent("player_disconnect", EventDisconnect); + #endif + #if defined _message_module MessageSetup(); #endif @@ -86,6 +91,11 @@ public OnPluginEnd() { #if defined _mute_module MuteDeSetup() #endif + + #if defined _ban_module + UnhookEvent("player_connect", EventConnect); + UnhookEvent("player_disconnect", EventDisconnect); + #endif } public OnClientAuthorized(int client) { diff --git a/FSB_BanSystem/modules/bans.sp b/FSB_BanSystem/modules/bans.sp index 531ecec..6221394 100644 --- a/FSB_BanSystem/modules/bans.sp +++ b/FSB_BanSystem/modules/bans.sp @@ -23,6 +23,29 @@ char g_BansTableName[32] = "bans_tablename"; Handle g_hBansDatabase = INVALID_HANDLE; bool g_ipCheckNewAccount = false; +//EVENTS +//player_connect +public Action:EventConnect(Handle:event, const String:name[], bool:dontBroadcast) +{ + SetEventBroadcast(event, true); + char player_name[64]; + GetEventString(event, "name", player_name, 64); + PrintToConsoleAll("%s connect to server", player_name); + return Plugin_Continue; +} + +//player_disconnect +public Action:EventDisconnect(Handle:event, const String:name[], bool:dontBroadcast) +{ + SetEventBroadcast(event, true); + char player_name[64]; + char reason[64]; + GetEventString(event, "name", player_name, 64); + GetEventString(event, "reason", reason, 64); + PrintToConsoleAll("%s leave from server with reason: %s", player_name, reason); + return Plugin_Continue; +} + //FUNCTIONS stock void BanCheckPlayer(int client){ diff --git a/TradeBlocker.sp b/TradeBlocker.sp index 79f107a..cba6815 100644 --- a/TradeBlocker.sp +++ b/TradeBlocker.sp @@ -1,7 +1,7 @@ #include #include -#define MAX_ARRAY_SIZE 32 +#define MAX_ARRAY_SIZE 64 #define MAX_MESSAGE_SIZE 256 //TODO MySql Get @@ -57,6 +57,29 @@ stock fillMe() { Format(badwords[13], MAX_MESSAGE_SIZE, "продам"); Format(badwords[14], MAX_MESSAGE_SIZE, "sell"); Format(badwords[15], MAX_MESSAGE_SIZE, "sеll"); + Format(badwords[16], MAX_MESSAGE_SIZE, "продаю вещи"); + Format(badwords[17], MAX_MESSAGE_SIZE, " ключи"); + Format(badwords[18], MAX_MESSAGE_SIZE, "металл"); + // + Format(badwords[19], MAX_MESSAGE_SIZE, "ТРЕЙД"); + Format(badwords[20], MAX_MESSAGE_SIZE, "TRADE"); + Format(badwords[21], MAX_MESSAGE_SIZE, "ОБМЕН"); + Format(badwords[22], MAX_MESSAGE_SIZE, "OБМЕН"); + Format(badwords[23], MAX_MESSAGE_SIZE, "ОБМEН"); + Format(badwords[24], MAX_MESSAGE_SIZE, "OБМEН"); + Format(badwords[25], MAX_MESSAGE_SIZE, "TRАDE"); + Format(badwords[26], MAX_MESSAGE_SIZE, "TRADЕ"); + Format(badwords[27], MAX_MESSAGE_SIZE, "TRАDЕ"); + Format(badwords[28], MAX_MESSAGE_SIZE, "ТРEЙД"); + Format(badwords[29], MAX_MESSAGE_SIZE, "ТPЕЙД"); + Format(badwords[30], MAX_MESSAGE_SIZE, "ТPEЙД"); + Format(badwords[31], MAX_MESSAGE_SIZE, "КУПЛЮ"); + Format(badwords[32], MAX_MESSAGE_SIZE, "ПРОДАМ"); + Format(badwords[33], MAX_MESSAGE_SIZE, "SELL"); + Format(badwords[34], MAX_MESSAGE_SIZE, "SЕLL"); + Format(badwords[35], MAX_MESSAGE_SIZE, "ПРОДАЮ ВЕЩИ"); + Format(badwords[36], MAX_MESSAGE_SIZE, " КЛЮЧИ"); + Format(badwords[37], MAX_MESSAGE_SIZE, "МЕТАЛЛ"); } stock genMessage(char[] buffer, int size) { diff --git a/plugins/fsb.smx b/plugins/fsb.smx index 6798e57..217b4a0 100644 Binary files a/plugins/fsb.smx and b/plugins/fsb.smx differ