Big Geordie

This is the place where you can find everything related to the dedicated server, control scripts and community tools.

Moderators: Pit Crew, TM-Patrol

User avatar
apovtx
happy cruiser
happy cruiser
Posts: 154
Joined: 04 Dec 2008 16:06
Owned TM-games: TMUF,TMNF,TMN
Manialink(s): funteam
Location: Xanthi,Greece
Contact:

Re: Big Geordie

Post by apovtx » 01 Aug 2010 08:44

Here it is:

Code: Select all

if ($aseco->isMasterAdmin($login)) {
should be

Code: Select all

if ($aseco->isMasterAdmin($player)) {
Do you wanna be a journalist?
Contact me with PM!
Image

Xymph
Pit Crew
Pit Crew
Posts: 5650
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: Big Geordie

Post by Xymph » 01 Aug 2010 08:50

Or "isMasterAdminL($login)" :wink:
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: Big Geordie

Post by Ant » 01 Aug 2010 14:47

apovtx wrote:Here it is:

Code: Select all

if ($aseco->isMasterAdmin($login)) {
should be

Code: Select all

if ($aseco->isMasterAdmin($player)) {
Thanks for that - now the message no longer appears :thumbsup:

The thing is now, the /bgbot command has no function that I can see - If I type /bgbot, then nothing - if I type /bgbot and a message after it, then the bot name just appears in chat with no message after it. This is the code I have now for the bgbot function, after all the changes.

Code: Select all

function chat_bgbot ($aseco, $command) {

    $botname = '$w$fc0Big Geordie says$z$fff ';

    $player = $command['author'];
    $message = $command['params'][0];
	$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!',
            '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));

    }

}
EDIT-->
Xymph wrote:Or "isMasterAdminL($login)" :wink:
Was you serious about that ? edit-> oh yeah, that does work as well :)

EDIT--> Anyway, for now, I've updated this in my downloads section for the most recent changes.

Download Here

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: Big Geordie

Post by Ant » 03 Aug 2010 21:52

Fuego, what is the /bgbot command supposed to show/do ?

User avatar
El Fuego
solid chaser
solid chaser
Posts: 1097
Joined: 27 Oct 2006 11:00
Owned TM-games: TMUF, TM2 C/S
Location: Nae too far frae Glesgie
Contact:

Re: Big Geordie

Post by El Fuego » 04 Aug 2010 07:58

It was a separate command available only to admins that presently offers only two options ...

1. /bgbot warn - show a chat message to tell people that an admin is watching them and might boot their asses out unless they behave. ;)

2. /bgbot close - show a chat message to advise players that the server will soon be shutting down. (I had this since I used to run my TMN server off my own PC, not a dedicated system).

It would be quite easy to offer additional/alternative responses. :)

If I remember I'll update my own link. :)
Cheers!
.FUEY.
Diary Of A Mad Man

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: Big Geordie

Post by Ant » 05 Aug 2010 01:52

I've tried those commands - and all that gets shown with both is "Big Geordie Says"

If I do /bg warn or /bg close then those messages get shown, but anyone who knows those commands can type em and they'll work. I know this cos I tested it with a non admin.

I could remove em from function BigGeordie - but then I won't have these commands at all, I just don't get why it doesn't work properly from the /bgbot command especially now that the admin function has been fixed thanks to the help from W1lla, Jouko and apovtx.

User avatar
El Fuego
solid chaser
solid chaser
Posts: 1097
Joined: 27 Oct 2006 11:00
Owned TM-games: TMUF, TM2 C/S
Location: Nae too far frae Glesgie
Contact:

Re: Big Geordie

Post by El Fuego » 05 Aug 2010 15:20

If you get "Big Geordie Says" when using /bgbot then it at least shows that the function is being called. :)

It seems like the $message variable is not containing what is expected. Try doing this as a test (line 78) ...

Code: Select all

$msg = $botname.$msg." - " .$message;
This should append exactly what the function is seeing as the chat command being made (after Big Geordie Says). Post back the result and I'll probably be able to advise on the issue. :)
Cheers!
.FUEY.
Diary Of A Mad Man

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: Big Geordie

Post by Ant » 05 Aug 2010 16:08

Ok I tried that, and it displays like this:

/bgbot warn displays Big Geordie Says - w
/bgbot close displays Big Geordie Says - c

Strangely though, /bgbot hello shows Big Geordie Says - h even though that isn't a command in the function, it seems to show the first letter of any word that I type after /bgbot. There is also nothing in the logfile apart from the command I typed.

EDIT--> It works now !! I changed line 78 back to normal then I tried changing line 52 from

Code: Select all

$message = $command['params'][0];
to

Code: Select all

$message = $command['params'];
And lo and behold, it finally works :mrgreen:

EDIT--> I have removed the bg warn and bg close from the main BigGeordie function now so only admins can produce these messages, and also added

Code: Select all

'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!',
to the admin commands and taken it away from the main function as well. Some other responses have been modified a little bit too - and I've updated my download accordingly with all these changes (hope you don't mind !)

You can check it out Here :thumbsup:

jouko100
speedy pilot
speedy pilot
Posts: 375
Joined: 10 Mar 2007 09:33
Location: finland
Contact:

Re: Big Geordie

Post by jouko100 » 06 Aug 2010 03:25

Code:
$message = $command['params'][0];
dont trust anybody :P

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: Big Geordie

Post by Ant » 06 Aug 2010 06:59

oh yeah, it was your fault I had such a headache with it !! - just kiddin man :roflol:

User avatar
El Fuego
solid chaser
solid chaser
Posts: 1097
Joined: 27 Oct 2006 11:00
Owned TM-games: TMUF, TM2 C/S
Location: Nae too far frae Glesgie
Contact:

Re: Big Geordie

Post by El Fuego » 06 Aug 2010 10:42

Remember that Big Geordie was written for Nations and the original Aseco. Back then the code in that line was correct. ;)
Cheers!
.FUEY.
Diary Of A Mad Man

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: Big Geordie

Post by Ant » 06 Aug 2010 11:25

Yeah I know but jouko got me to change

Code: Select all

$message = $command['params'];
to

Code: Select all

$message = $command['params'][0];
And It worked when I changed it back to normal. (After other changes as well) - so thanks everyone, this works perfectly with TMF and Xaseco v1.11 now (the code in my download anyway)

By the way Fuego, Xymph has moved this from Old/obsolete/TMN Plugins on his site to Third-party (TMF) Plugins, (couple of weeks or so ago now) dya wanna update your link in your start post with this one now ? - My download also has a readme on its various functions too :)

User avatar
El Fuego
solid chaser
solid chaser
Posts: 1097
Joined: 27 Oct 2006 11:00
Owned TM-games: TMUF, TM2 C/S
Location: Nae too far frae Glesgie
Contact:

Re: Big Geordie

Post by El Fuego » 06 Aug 2010 11:46

Original link now points to Ant's file. :)
Cheers!
.FUEY.
Diary Of A Mad Man

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: Big Geordie

Post by Ant » 06 Aug 2010 12:03

Nice one man, I had to try and keep this plugin alive cos I think its very useful :thumbsup:

Of course I wouldn't have managed this without everyone who helped - so to all that helped me, thank you very much :D

JagMan
wheelbarrow operator
wheelbarrow operator
Posts: 23
Joined: 28 Aug 2009 23:22
Owned TM-games: TMNF

Re: Big Geordie

Post by JagMan » 18 Sep 2010 21:06

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: Select all

<?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 !

Post Reply