I tested the previous code and it worked. However it will only block 1 space between the numbers.
This one will block up to 4 spaces between the numbers. If they use 5 spaces or more this will not work.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <regex>
new const BlockIps[ ] = "\d{1,3}\s{1,4}\d{1,3}\s{1,4}\d{1,3}\s{1,4}\d{1,3}"
new ret,error[ 2 ]
new Regex:Spam
public plugin_init()
{
register_plugin( "Block IP", "1.0", "Allied")
register_clcmd( "say", "spamming" )
register_clcmd( "say_team", "spamming" )
Spam = regex_compile ( BlockIps, ret, error, charsmax ( error ) )
}
public spamming( id )
{
new text[ 128 ], ret
read_args( text, charsmax( text ) )
new Check = regex_match_c( text, Spam, ret )
if( Check > 0 )
{
client_print( id, print_chat, "Stop Advertising !!" )
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}