Hy all.. it didn't work so well for me

at any word i wrote, or anybody wrote, the bot is responding with this
'$f30Please do not use foul and abusive language $z'.$author.'$z$f30. Consider yourself warned! The \'F\' and \'C\' words may get you kicked!';Here is my Code:
Code:
<?php
// Big Geordie bot plugin
// By XXX El Fuego
// October 29th, 2006
// Version 0.3 (7th November 2006)
// Added rank kick function
// Version 0.4 (February 1st, 2008)
// Changed $loginname to $pid in BOT check line for messages
// Added a comma after the last array element to simplify user changes
// Requires RASP 1.3a or higher for the chat_bgbot function
// Changelog: Moved chat_bgbot messages to BigGeordie, but function name retained for future use
// Added an option to swear section to KICK on certain words
// Now works with TMF !!
// Big Geordie bot responses to the '/bgbot' prompt
Aseco::addChatCommand("bgbot", "Action calls to Big Geordie");
// Check player rank and kick too high
Aseco::registerEvent("onPlayerConnect", "check_rank");
function check_rank ($aseco, $command) {
// Enable/Disable rank kicker
$rankkick = false;
if ( $rankkick ) {
// Set rank limit
$ranklimit = 75000;
$playerlogin = $command->login;
$playernick = $command->nickname;
$playerrank = $command->ladderrank;
if ( $playerrank > $ranklimit ) {
$msg = "$z$w$i$f30Sorry $z$playernick, $z$w$i$f30but I have to kick you as your rank number is higher than this server allows!";
$aseco->addCall("ChatSendToLogin",array($msg, $playerlogin));
$aseco->addCall("Kick", array($playerlogin));
}
}
}
function chat_bgbot ($aseco, $command) {
$botname = '$w$fc0Big Geordie says$z$fff ';
$player = $command['author'];
$message = $command['params'];
$login = $player->login;
// print_r ($message);
if ($aseco->isMasterAdmin($player)) {
$logtitle = 'MasterAdmin';
$chattitle = $aseco->titles['MASTERADMIN'][0];
$bgarray = array (
'warn' => 'I am the master of this server. Don\'t ever cross me! Do that again and I\'ll have you!',
'swear' => 'Please note that I am watching for any swearing. Most words will mean a warning, but anyone using the \'F\' or \'C\' words gets kicked!',
'close' => 'This server is shutting down in a moment. Thanks for playing!'
);
if ( strlen ($message) > 0 ) {
$msgarr = explode ( ' ', $message );
foreach ( $bgarray as $k => $v ) {
if ( stristr ($msgarr[0], $k) ) {
$msg = $v;
break;
}
}
$msg = $botname.$msg;
$aseco->addCall("ChatSendServerMessage", array($msg));
}
} else {
// writes warning in console ...
$aseco->console($login." tried to use BGBOT chat command (no permission!)");
// sends chat message ...
$aseco->addCall("ChatSendToLogin",
array($aseco->formatColors("{#error}You have to be in admin list to do that!"), $login));
}
}
// Big Geordie bot response to general chat
Aseco::registerEvent("onChat", "BigGeordie");
function BigGeordie ($aseco, $command) {
$botname = '$w$fc0Big Geordie says$z$fff ';
$pid = $command[0];
$loginname = $command[1];
$message = $command[2];
// print_r ($player);
if ( !stristr ($message, '/bgbot') && $pid != 0) { // Make sure we don't catch BOT calls or server messages
$player = $aseco->server->players->getPlayer($loginname);
$author = $player->nickname;
// Check for swear words and warn
// Enable/Disable swear filter
$swearon = true;
// Enable/Disable swear kick option
$swearkick = true;
// Swear word found flag
$swear = true;
if ( $swearon ) {
$sweararr = array (
'****' => true,
'****' => true,
'piss' => false,
'twat' => false,
'cock' => false,
'****' => false,
'shoite' => false,
'turd' => false,
'bastard' => false,
'prick' => false,
'bugger' => false
);
foreach ( $sweararr as $k => $v ) {
if ( stristr ($message, $k) ) {
$swear = true;
break;
}
}
if ( $swear && $v && $swearkick ) {
$msg = $botname.'$f30That word is beyond the pale $z'.$author.'$z$f30. You are being kicked!';
$aseco->addCall("ChatSendServerMessage", array($msg));
$aseco->addCall("Kick", array($loginname));
} elseif ( $swear ) {
$msg = $botname.'$f30Please do not use foul and abusive language $z'.$author.'$z$f30. Consider yourself warned! The \'F\' and \'C\' words may get you kicked!';
$aseco->addCall("ChatSendServerMessage", array($msg));
}
}
if ( !$swearon || !$swear ) {
// Array of BOT responses
// Add new keywords to the first array level, then add an array of responses
$bgarr = array (
'here big man' => array (
'Thanks for putting me mind at rest. Ah was worried for a moment.'
),
'shut up geordie,shut up bg,shutup bot,shutup geordie,shutup bg,shutup bot' => array (
'Who\'s gonna make me? You? HA HA HA HA HA!',
'Yeah right, the wimp has spoken!',
'Leave it, or you\'ll be crapping your teeth tomorrow!'
),
'geordie,big g' => array (
'Someone mention me name?',
'What d\'ya want ya wassack?',
'Who rang da bell?'
),
'goerdie,gerodie,goredie' => array (
'Lern whee ta spell, ya wassack!'
),
'get star,get a star' => array (
'Are ye into Astrophysics or summat? Or div ye mean in Trackmania? :-P',
'Ye need to cajole/bribe/pursuade someone to vote for you at trackmanianations.com and Bob\'s your parent\'s brother! :-)',
'Start with a cold gas. This is attracted to the centre by gravity.The outside forms into a disk as the inside continues to heat up and contract eventually stabalizing the pressure. This is how you make a star.'
),
'lo bg,hi bg,lo geordie,hi geordie' => array (
'How you doing '.$author.'$z$fff?',
'Wassup '.$author.'$z$fff? You OK?'
),
'virus' => array (
'HACK ATTACK!!!! LOOK OUT!!!',
'Did you forget to select the right account again DIO? Hehe!'
),
'hello,ello,howdy,hi all,lo all,alreet,hey all' => array (
'Howdy pardner!',
'Alreet pal?',
'Yo '.$author
),
'lol,haha,lool,lewl,rofl,hehe' => array (
'You\'ll laugh at anything!',
'HA HA HA HA HA HA ... ha ha ha ... ha ... Erm - I\'ll shut up now, eh?',
'How man! Calm down, calm down! Eh? Eh?',
'Makes me laugh too!',
'HAR HAR HAR de bloody HAR!',
'U R teh funny geezer!',
'Makes me laugh too!',
'That\'s geet funny as out man!',
'I kna - I\'m wetting mesell!',
':-D',
'Just as well I\'m not allowed to drive as I\'d PWN that lot of ya!'
),
'jk' => array (
'Very funny! I nearly wet myself! :-S',
'You reckon that\'s funny?',
'HA HA HA HA HA HA HA HA HA ... ha ha ... ha ... erm - I\'ll shut up now.',
':-D'
),
'drive' => array (
'Can I drive please? Pretty please?'
),
'scouse,scows' => array (
'Lot\'s of people confuse Geordies and Scousers. Dunno why tho! :-S'
),
'locator,loc ' => array (
'The locator or .loc file allows players to download the gfx or music from the web instead of your computer, thereby decreasing the time it takes for your skin to show up or track music to be available.'
),
'hard,difficult' => array (
'You reckon $wthat\'s$z$fff hard? Wait till you see the next one!',
'Very!',
'Wimp!'
),
'/official' => array (
'Your account and ladder score, as per your request, have been deleted.'."\n".'(Press Alt+F4 to cancel)',
'NOOOOOOOB!'
),
'nooo' => array (
'Has No arrived?',
'Oh yesss!',
'Unlucky'
),
'yarr' => array (
'SOOPER SPEEEEEEEEEED!!'
),
'brb' => array (
'OK, hurry tho.',
'We know what your doing!',
'Aye right - the clock\'s ticking.',
'Giving up already?'
),
'afk' => array (
'Don\'t go! You\'ll lose your ladder points!',
'How can you be AFK when you just typed in AFK? :-S',
'If you\'re not back in 5 minutes I\'m booting your ass outta here!',
'Attention span of a frigging gnat!',
'Lets all hide when he comes back!',
'Is all this hot action getting ya steamed up? ;-)'
),
'bbl,gtg,g2g' => array (
'See ya next time.',
'Come back later if you want.',
'Something more interesting to do?',
'Cheers m8 for gracing us with your presence. ;-)',
),
'cya all,cya l8r,ttfn,bb,ciao,bye all,bye,cya,cyas,cyas all,cya later,cya later all,cyas later all,cya l8r all,cyas l8r all,cu m8,c u m8' => array (
'See ya next time.',
'Tara m8. Peace!',
'Ciao for now.',
'Cheers big ears!',
'Don\'t go! I\'ll miss ya - and I don\'t like missing when I throw darts.'
),
'gg all,gga' => array (
'More luck than skill I think.',
'Except for that git beeping all the time!',
'Next one should be good too.',
'How could it be good? I wasn\'t driving!',
'Splendiferous!'
),
'you ok bot,u ok bot,you ok bg,u ok bg,you ok geordie,u ok geordie' => array (
'As well as a big man like me can be.',
'Well, apart from having to admin a bunch of idiots, yes. ;-)',
'Wey aye man!',
'Fair to muddling.',
'Been better - been worse.'
),
'thx bot,thx bg,thx geordie' => array (
'At your service.',
'Anytime, my little skin covered friend.',
'NP, but im charging next time. :-)',
'You scratch my back - I\'ll scratch yours.',
'All part of the job pal.'
),
'crash,Crashed' => array (
'Cos you got no skill.',
'Reactions of an overweight limpet.',
'You do realise that there are corners and you have to go round them, don\'t ya?',
'Try turning your monitor on.',
'Typical!'
),
'hmm' => array (
'Wassamarra? You no likey this track or summick?',
'Try singing the song rather than humming, then we might know it!'
),
'/like,/hate' => array (
'Please use /++ and /-- to vote for/against a track.'
),
'jukebox' => array (
'To use $0a0JUKEBOX$fff first type $0ff/list$fff to get map i.d. number, then type $0ff/jukebox$fff and the number of your map. eg.$0ff/jukebox 23$z'
),
'karma' => array (
'Typing $0ff/karma$fff allows you to see how good a track is. To give a karma point type $0ff/++$z or $0ff/--$z if you dislike it. 1 vote per person per track, you can change at any time.'
),
'rank' => array (
'Typing $0ff/rank$fff shows your position in relation to unique players that have visited this server. Depends on your highest placings in the maps on rotation.'
),
'help' => array (
'Type: '."\n".'$0a0/rank$fff (shows server rank and average track placing); $0a0/pb$fff (shows personal best on track)'."\n".'$0a0/recs$fff (shows top server records); $0a0/top10$fff (Shows top 10 server players)'."\n".'$0a0/list$fff (shows the map numbers); $0a0/jukebox ?$fff (Queue map up)'
),
'skins' => array (
'Please go to $0a0www.trackmania-carpark.com$fff to get your skins. Don\'t forget to download the locator file too, if it\'s available.'
),
'teams' => array (
'Type in /teamname YOURTEAM to assign to a team. Please note that YourTeam, yourteam and YOURTEAM are all different teams - the name is case-sensitive!'
),
'are you gay,ru gay,r u gay,are u gay,r you gay' => array (
'Do u want a beatin !!',
'That sort of question will get your face smashed in lad !!',
'No way man, ask your ma !',
'err, I think YOUR gay for even askin !',
'why? lookin for some action gayboy ??'
),
'ur gay,your gay,u r gay,you r gay,u are gay,you are gay,you gay,u gay' => array (
'Do u want a beatin !!',
'No way man, ask your ma !',
'err, I think YOUR gay for even sayin that ****!',
'You wish, gayboy !!',
'Shut it rent boy !!'
),
);
$respond = false;
foreach ( $bgarr as $k => $v ) {
$karr = explode (',', $k);
foreach ( $karr as $k2 ) {
if ( stristr ($message, $k2) ) {
$respond = true;
if ( is_array ($v) ) {
srand((double)microtime()*1000000);
$num = rand(0,sizeof($v)-1);
$msg = $v[$num];
} else {
$msg = $v;
}
break;
}
}
if ( $respond ) break;
}
if ( $respond ) {
$msg = $botname.$msg;
$aseco->addCall("ChatSendServerMessage", array($msg));
}
}
}
}
?>
Ty in Advance !