ChatFilter: optimize code
you guys proud of me? xD
This commit is contained in:
		
							parent
							
								
									03bd888ba1
								
							
						
					
					
						commit
						e96d61d5d3
					
				@ -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)
 | 
			
		||||
		{
 | 
			
		||||
			lennies = 1;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if(lennies == 1 || (g_bBlockCommands[client] && (index == 0 || index == 7)) || g_bBlockChat[client])
 | 
			
		||||
		return Plugin_Handled;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return Plugin_Continue;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user