Results 1 to 10 of 21

Thread: [Perl] [COD2] Nanny

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Corporal voron00's Avatar
    Join Date
    Nov 2014
    Posts
    248
    Thanks
    64
    Thanked 216 Times in 116 Posts

    Post [Perl] [COD2] Nanny

    Hello, i just want to share this awesome piece of code that i've been working on for nearly 4 years


    Some historical explanations:

    Original name of this program is NannyBot, and it was written by smugllama so all respect
    goes to him first.
    The project was abandoned in 2010.
    But you can still get it download the original from http://smaert.com/nannybot.zip

    Shortly, NannyBot is a log-parser, she loops through the server log-file and filters all
    necessary data with regular expressions, she does not modify any game-files,
    things like chat-responses, player statistics, !commands, etc. etc. are coming from this.

    To send rcon commands to a server, NannyBot are using very old KKron perl module http://kkrcon.sourceforge.net/
    Smugllama has improved it a bit, and so did i.

    So what i did and why:

    The thing has started somwhere in 2011 when i got my hands on RUS_Toujane_SD server, i wanted to bring NannyBot there,
    but since 90% of people on that server are Russian, back than, i just wanted to translate
    NannyBot to Russian language so i started digging through it's source code.

    Job well done:

    The whole deal went really far and despite the translation, NannyBot received
    insane amount of good stuff from me and some of my friends.
    Here is only some of stuff i did:

    1. .exe?! Nope:

    A perl script must be a perl script, it must run on whatever you want it to run. Windows, Linux, Macs, Mobile phones (hopefully in a future),
    doesn't matter. The bad thing is, you must have a perl-runtime installed.
    Linux and Macs already have it, on windows there is a cool build of perl called Strawberry Perl.

    2. Use player GUID's to track their stats

    Originally in NannyBot, players stats has been tracked by their nicknames,
    this is good idea only if you are running a cracked server and everyone have
    a Zero (0) GUID, but since most servers (even now) are pure, i made NannyBot
    to track stats using GUID numbers.
    Also added stats tracking for SD bomb plants/defuses, first bloods, nice/bad shots.
    Also ability to remove stats for a player via single chat command.

    3. Better IP-Geolocation

    I've improved the geolocation code, and updated it's dependent modules and database
    to the latest versions.

    4. Voting system

    No idea for what reason i did it, but i did it: !votekick, !voteban, !votemap, !votemap, !votetype
    The thing is actually pretty simple and stupid, 60% of players on a server must vote !yes to make it pass.

    5. Many many more...

    There has been a lot of things done, many new !commands, etc.etc.etc...
    You can loop through my github, there is not everything committed, the 'fork',
    was started way earlier, but anyways...

    Note: I removed the (Bot) thing from name, because...reasons...so now it's just Nanny.

    Why now? It's 2015 already dude!:

    Sorry about that, but i never planned of making an english version of 'Nanny'
    But recently i had some time to do it and on RUS_Toujane_SD some people has
    been asking for it.

    Anyways, you can get it on my github page:
    https://github.com/voron00/Nanny
    English branch: https://github.com/voron00/Nanny/tree/cod2_english
    Russian branch: https://github.com/voron00/Nanny/tree/cod2_russian
    I know, i screwed up some commits there, but...anyways...

    Install instruction are in README.md, it's pretty simple.
    On linux, you need to install some modules through CPAN.
    If you have any questions about that, you can ask here or
    help yourself by using Google.
    On windows, install a perl runtime, configure and run, easy as hell.
    Also to simplify the intallation, i already included some dependent modules
    in my github project.

    Bugs:

    Although, i squashed most of them, there are some bugs:

    1. FTP, FTP and FTP: Nanny does't work properly with
    some windows ftp servers (FileZilla?). Also rare issues like
    disconnects, 'double' messages.

    2. English translation issues (typos, crappy translated things, etc.)
    The definitions database contains english and russian definitions (too lazy to care)

    3. Code formatting issues on github:
    I higly recommend using Notepad++ for viewing the code, it's simply great.

    Well, i think that's all, not sure what else...Ii'm too lazy to post ALL the !commands,
    but you can find them in a chat section (lines 1293-2335) or a config file.
    Translation fixes, ideas are very welcome, thanks for reading and
    good luck exploring the project.

  2. The Following 7 Users Say Thank You to voron00 For This Useful Post:

    kung foo man (27th February 2015),maxdamage99 (1st March 2015),Ni3ls (27th February 2015),Seeker'Z (25th July 2019),serthy (27th February 2015),ysniper (24th March 2016),YuriJurek (27th February 2015)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •