diff --git a/AntiLenny/scripting/AntiLenny.sp b/AntiLenny/scripting/AntiLenny.sp index 9a75fbaa..f0056d62 100644 --- a/AntiLenny/scripting/AntiLenny.sp +++ b/AntiLenny/scripting/AntiLenny.sp @@ -5,10 +5,11 @@ #include #include #include +#include bool g_bHideLennies[MAXPLAYERS + 1] = { false, ... }; -char g_cLennies[19][] = {"( ͡° ͜ʖ ͡°)", "(° ͜ʖ °)", "( ͝͠°͜ل͝͠°)", "( ͡° ͜ ͡°)", "( ͡°╭͜ʖ╮͡° )", "( ͠° ͜ʖ ͡°)", "( ° ͜ʖ °)", "(╯°□°)╯", "_(ツ)_", "_ツ_", "( ̿°̿ ͜ل͜ ̿°̿ )", "( ͡", "( ͠", "( ͝", "( °", "(͡", "ಠ_ಠ", "͡°", "°͡"}; +char g_cLennies[20][] = {"( ͡° ͜ʖ ͡°)", "͜ʖ", "(° ͜ʖ °)", "( ͝͠°͜ل͝͠°)", "( ͡° ͜ ͡°)", "( ͡°╭͜ʖ╮͡° )", "( ͠° ͜ʖ ͡°)", "( ° ͜ʖ °)", "(╯°□°)╯", "_(ツ)_", "_ツ_", "( ̿°̿ ͜ل͜ ̿°̿ )", "( ͡", "( ͠", "( ͝", "( °", "(͡", "ಠ_ಠ", "͡°", "°͡"}; public Plugin myinfo = { @@ -26,11 +27,16 @@ public void OnPluginStart() public Action CCC_OnChatMessage(int client, int author, const char[] message) { - for(int i = 0; i < 19; i++) + char buffer[192]; + strcopy(buffer, sizeof(buffer), message); + + CRemoveTags(buffer, 192); + + for(int i = 0; i < 20; i++) { - if(g_bHideLennies[client] && StrContains(message, g_cLennies[i], false) != -1) + if(g_bHideLennies[client] && StrContains(buffer, g_cLennies[i], false) != -1) { - return Plugin_Handled; + return Plugin_Handled; } } return Plugin_Continue;