interkill / brtghost

Automatically exported from code.google.com/p/brtghost
GNU General Public License v3.0
0 stars 0 forks source link

Disabling lang strings, specifically the "Player xxxx has joined from [0.0.0.0]" #10

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I want to disable the "Player xxxx has joined from [0.0.0.0]" message, but I 
can't seem to find a  way to do it. I've tryed to set the lang string to empty 
spaces, but then the bot thinks that the lang str is missing and outputs an 
error.

There should be a way to disable specific lang strings in case I want the bot 
to be as silent as possible.

Original issue reported on code.google.com by ivan.tod...@gmail.com on 27 Oct 2011 at 3:58

GoogleCodeExporter commented 9 years ago
Open game_base.cpp, search for the following:

// join message from diff realms

and comment the following (place 2 slashes in front -> // )
SendAllChat( tr("lang_1504", "$NAME$", joinPlayer->GetName( ), "$FROM$", 
JoinedRealm == string( ) ? "garena\\lan" : JoinedRealm ));

this line might look different in older revisions. then recompile the bot and 
make your own ghost++ binary or ghost.exe

Original comment by angelus...@gmail.com on 28 Oct 2011 at 9:40

GoogleCodeExporter commented 9 years ago
It's good idea.

We must only add in both of CLanguage::GetLang functions a check of the lang 
string on the specified string (like "ignore" for exemle), and return null or 
specified string. Then we must change all SendChat functions in a game_base.cpp 
to check an incoming string and just do nothing if there null or specified 
string.

So now you can force  bot  to ignore and dont show any message you want, just 
by typing "ignore" in a lang string.

Original comment by gpm.grif...@gmail.com on 10 Nov 2011 at 8:36

GoogleCodeExporter commented 9 years ago
I made a config variable, bot_announceplayerjoin, which lets you turn this 
on/off.

Original comment by michael....@gmail.com on 22 Nov 2011 at 2:23