diff --git a/ChatFilter/scripting/ChatFilter.sp b/ChatFilter/scripting/ChatFilter.sp index 86ba4a15..d8d7f870 100644 --- a/ChatFilter/scripting/ChatFilter.sp +++ b/ChatFilter/scripting/ChatFilter.sp @@ -148,14 +148,19 @@ public int MenuHandler_MainMenu(Menu menu, MenuAction action, int client, int se public Action CCC_OnChatMessage(int client, int author, const char[] message) { int index = FindCharInString(message, '!', false); + int lennies = 0; for(int i = 0; i < NUMBEROFLENNIES; i++) { - if((g_bHideLennies[client] && StrContains(message, g_cLennies[i], false) != -1) || (g_bBlockCommands[client] && (index == 0 || index == 7)) || g_bBlockChat[client]) + if(g_bHideLennies[client] && StrContains(message, g_cLennies[i], false) != -1) { - return Plugin_Handled; + lennies = 1; } } + + if(lennies == 1 || (g_bBlockCommands[client] && (index == 0 || index == 7)) || g_bBlockChat[client]) + return Plugin_Handled; + return Plugin_Continue; }