Mhh it's still the same problem, now i got this code:
PHP Code:
new i, pos, old, b_found, b_ignore
for ( i = 0; i < g_swearNum_high; i++ )
{
pos = 0
old = -1
while ( ( pos += containi ( message[ pos ], badword_high[i] ) ) > old )
{
b_found++
old = pos
}
}
for ( i = 0; i < g_swearNum_mid; i++ )
{
pos = 0
old = -1
while ( ( pos += containi ( message[ pos ], badword_mid[i] ) ) > old )
{
b_found++
old = pos
}
}
for ( i = 0; i < g_swearNum_warn; i++ )
{
pos = 0
old = -1
while ( ( pos += containi ( message[ pos ], badword_warn[i] ) ) > old )
{
b_found++
old = pos
}
}
for ( i = 0; i < g_swearNum_ignore; i++ )
{
pos = 0
old = -1
while ( ( pos += containi ( message[ pos ], badword_ignore[i] ) ) > old )
{
b_ignore++
old = pos
}
}
if(b_found == b_ignore)
{
badword_found = true
}
I got 4 configs there, low mid and high with insults in it and one with the words to ignore.
warn = just block (not that hard insults)
mid = gag for 1 hour (mid insults)
high = gag for 1 day (hard insults)