PHP script error, over and over and over again.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Trix
Forum Newbie
Posts: 2
Joined: Mon Nov 20, 2006 11:04 pm

PHP script error, over and over and over again.

Post 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]
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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().
Trix
Forum Newbie
Posts: 2
Joined: Mon Nov 20, 2006 11:04 pm

Post 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!
Post Reply