PDA

View Full Version : Install Nanny (bot)



sttte93
7th March 2017, 12:42
Hi all,
Today i would like to install this awesome bot in my server starting from 0. Your help is indispensable.
So, starting from here https://github.com/voron00/Nanny/tree/cod2_english

Instructions to run in *nix:

Install through CPAN (http://www.cpan.org/modules/INSTALL.html) dependent modules: DBI, DBD::SQLite, LWP::Simple
Setup every necessary parameters in nanny.cfg
Launch in terminal. In *nix you can use nanny.sh

The first command to write in the terminal is this?


cpan App::cpanminus

There is a method to install it in a different folder? If yes, how?

Then for install the DBI, DBD::SQLite, LWP::Simple modules, i need to write this?


cpanm Module::DBI
cpanm Module::DBD::SQLite
cpanm Module::LWP::Simple

Also here, there is a method to install it in a different folder/? If yes, how?
Thanks.

voron00
7th March 2017, 13:05
cpanm DBI
cpanm DBD::SQLite
cpanm LWP::Simple

or just


cpan DBI
cpan DBD::SQLite
cpan LWP::Simple (cpanminus is actually optional)

If you are root they will be installed to /usr/local/lib/perl, if not root, should be in your /home/per5 dir, you proably can change that paths but idk why you need to though.

sttte93
7th March 2017, 13:21
cpanm DBI
cpanm DBD::SQLite
cpanm LWP::Simple

or just


cpan DBI
cpan DBD::SQLite
cpan LWP::Simple (cpanminus is actually optional)

If you are root they will be installed to /usr/local/lib/perl, if not root, should be in your /home/per5 dir, you proably can change that paths but idk why you need to though.

If i install it on a ssd, i will get more performance or no?

voron00
7th March 2017, 13:42
I don't see any connection between ssd and perl modules lol, you proably shouldn't bother about that.

sttte93
7th March 2017, 14:25
I don't see any connection between ssd and perl modules lol, you proably shouldn't bother about that.

Ok. So, i wrote :


cpan DBI

and this is the result :

1286

:confused:

voron00
7th March 2017, 14:35
sudo apt-get install make

sttte93
7th March 2017, 15:02
sudo apt-get install make

I write that, and then :


cpan DBI

1287

sttte93
7th March 2017, 15:04
I write that, and then :


cpan DBI

1287

Ok. Maybe the answer was:

sudo cpan DBI

sttte93
7th March 2017, 15:27
Ok, seems running :) Thank you voron00.
PS: where i can find geoip [!locate command] updated? :)

voron00
7th March 2017, 15:49
http://dev.maxmind.com/geoip/legacy/geolite/ (http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz)

Just replace GeoLiteCity.dat with the newest one

sttte93
7th March 2017, 15:57
http://dev.maxmind.com/geoip/legacy/geolite/ (http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz)

Just replace GeoLiteCity.dat with the newest one

Thank you.

sttte93
11th March 2017, 12:15
When a player type !help for the help commands, console write his commands on public chat. How can i set to private? :confused:

kung foo man
11th March 2017, 13:58
IIRC you need to find the position which says say $msg and replace it with tell $playerid $msg... and hack that into Perl code ^^

Edit:

I checked the source now, this seems to be it: https://github.com/voron00/Nanny/blob/cod2_russian/nanny.pl#L2749

Try to replace this:



&rcon_command("say $name^7: Вы можете использовать ^1!stats ^7чтобы узнать свою подробную статистику");


With:



&rcon_command("tell $slot $name^7: Вы можете использовать ^1!stats ^7чтобы узнать свою подробную статистику");


But since the !say $name scheme is like over 20 times there, you gotta replace it in every line.

voron00
12th March 2017, 06:21
I wouldn't recommend doing that because nanny is 100% sinchoronous and will not respond to anyone else until she finishes that help command (unless you feel like a boss and will implent threads lol)

sttte93
12th March 2017, 11:25
Ok, thank you.
I have another problem with nanny. It's about guids. I have an original Guid for cod2 but, sometimes (random) when a map changes, my guid becomes 0.
I already set, in the nanny.cfg, guid_sanity_check = yes and restarted, many times, the server. It's affect also other players with original guid, not only me. And is a cracked server. :confused:
Any suggestions?

voron00
12th March 2017, 21:36
Just reconnect, or use your ip as auth.

IzNoGoD
12th March 2017, 21:52
masterserver doing the derpy dance again.

sttte93
22nd March 2017, 20:38
Just reconnect, or use your ip as auth.

Ok thanks. What can i do with !stats if i have guid problems with players?

bulent
3rd May 2020, 02:35
root@administrator:~/cod2/cod13/Nanny# ./nanny.sh
Can't locate Rcon/KKrcon.pm in @INC (you may need to install the Rcon::KKrcon module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at nanny.pl line 63.
BEGIN failed--compilation aborted at nanny.pl line 63 (#1)
(F) You said to do (or require, or use) a file that couldn't be found.
Perl looks for the file in all the locations mentioned in @INC, unless
the file name included the full path to the file. Perhaps you need
to set the PERL5LIB or PERL5OPT environment variable to say where the
extra library is, or maybe the script needs to add the library name
to @INC. Or maybe you just misspelled the name of the file. See
"require" in perlfunc and lib.

Uncaught exception from user code:
Can't locate Rcon/KKrcon.pm in @INC (you may need to install the Rcon::KKrcon module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at nanny.pl line 63.
BEGIN failed--compilation aborted at nanny.pl line 63.

CaptainSlow
4th May 2020, 22:08
root@administrator:~/cod2/cod13/Nanny# ./nanny.sh
Can't locate Rcon/KKrcon.pm in @INC (you may need to install the Rcon::KKrcon module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at nanny.pl line 63.
BEGIN failed--compilation aborted at nanny.pl line 63 (#1)
(F) You said to do (or require, or use) a file that couldn't be found.
Perl looks for the file in all the locations mentioned in @INC, unless
the file name included the full path to the file. Perhaps you need
to set the PERL5LIB or PERL5OPT environment variable to say where the
extra library is, or maybe the script needs to add the library name
to @INC. Or maybe you just misspelled the name of the file. See
"require" in perlfunc and lib.

Uncaught exception from user code:
Can't locate Rcon/KKrcon.pm in @INC (you may need to install the Rcon::KKrcon module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at nanny.pl line 63.
BEGIN failed--compilation aborted at nanny.pl line 63.

Have you installed the KKrcon module? http://kkrcon.sourceforge.net/

Kima
29th July 2020, 19:47
Have you installed the KKrcon module? http://kkrcon.sourceforge.net/

Hi buddy,

i have the same problem on my second server. The only thing that differentiates these two cases is the OS used on my server number 1 under ubuntu 16.04 I had no problem nanny run well but on my second under ubuntu 18.04 with the same installation method I have this problem.

1617

If you have a solution or need more information dont hesitate.