Page 1 of 1

PHP script error, over and over and over again.

Posted: Mon Nov 20, 2006 11:10 pm
by Trix
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


im trying to flood protect my php bot, and here is the part of the script that keeps giving me the errors

Code: Select all

function process_commands()
{
    global $con, $CONFIG;

    $said = $con['buffer']['text'];
    $lsaid = strtolower($said);
    $thisdate = date( "F j, Y, g:i a", time() );
    $break = "\r\n";
    

    if ( !( $lsaid '!' * 4) === false )
    {
        cmd_send("KICK $lsaid Stop Repeting!!");
    }

it shuld kick whoever uses a ! 4 times in a row correct? sugestions? lawl, im lost


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Mon Nov 20, 2006 11:17 pm
by feyd
Trix wrote:it shuld kick whoever uses a ! 4 times in a row correct? sugestions? lawl, im lost
Not even close.

I'll have to guess that you want something like strpos().

Posted: Mon Nov 20, 2006 11:26 pm
by Trix
feyd wrote:
Trix wrote:it shuld kick whoever uses a ! 4 times in a row correct? sugestions? lawl, im lost
Not even close.

I'll have to guess that you want something like strpos().
okaythat works perfect tyvvm!