1. Соблюдайте Правила форума и проявляйте уважение к другим участникам беседы.

OpenSource [GHostOne][Patch] Autohost Random Game Names

Тема в разделе 'Кодинг/Собственные решения', создана пользователем Deals, 10 окт 2010.

  1. Magm0r Ньюфаг

    Сообщения:
    3
    Спасибы:
    0
    Какие еще фиксы нужны для брт бота (1.7.0.9 r151) чтобы нормально работало ? крашится через ~5 секунд после запуска (создавать игру успевает (рандомно, как и надо) и сразу ошибка, в пабе висит повисшая игра конешно)
    Код:
    [Tue May 22 13:52:30 2012] [                            GHOST] starting up
    [Tue May 22 13:52:30 2012] [                            GHOST] using log method 1, logging is enabled and [log.txt] will not be locked
    [Tue May 22 13:52:30 2012] [                            GHOST] using Windows timer with resolution 1 milliseconds
    [Tue May 22 13:52:30 2012] [                            GHOST] starting winsock
    [Tue May 22 13:52:30 2012] [                            GHOST] setting process priority to "above normal"
    [Tue May 22 13:52:30 2012] [                        UDPSOCKET] using default broadcast target
    [Tue May 22 13:52:30 2012] [                            GHOST] opening primary database
    [Tue May 22 13:52:30 2012] [                            MYSQL] connecting to database server
    [Tue May 22 13:52:30 2012] [                            GHOST] opening secondary (local) database
    [Tue May 22 13:52:30 2012] [                          SQLITE3] version 3.6.16
    [Tue May 22 13:52:30 2012] [                          SQLITE3] opening database [ghost.dbs]
    [Tue May 22 13:52:30 2012] [                          SQLITE3] found schema number [7_b]
    [Tue May 22 13:52:30 2012] [                          SQLITE3] checking ban table
    [Tue May 22 13:52:30 2012] [                          SQLITE3] found tempban additions
    [Tue May 22 13:52:30 2012] [                          SQLITE3] checking admin table
    [Tue May 22 13:52:30 2012] [                          SQLITE3] found improved admins table
    [Tue May 22 13:52:30 2012] [                          SQLITE3] checking score table
    [Tue May 22 13:52:30 2012] [                          SQLITE3] found normal score table
    [Tue May 22 13:52:30 2012] [                          SQLITE3] checking score table 2
    [Tue May 22 13:52:30 2012] [                          SQLITE3] found normal score table
    [Tue May 22 13:52:30 2012] [                          SQLITE3] checking safelist table
    [Tue May 22 13:52:30 2012] [                          SQLITE3] creating safelist table
    [Tue May 22 13:52:30 2012] [                          SQLITE3] error creating table safelist - table safelist already exists
    [Tue May 22 13:52:30 2012] [                          SQLITE3] checking improved safelist table
    [Tue May 22 13:52:30 2012] [                          SQLITE3] upgrading safelist table
    [Tue May 22 13:52:30 2012] [                          SQLITE3] error upgrading safelist table - duplicate column name: voucher
    [Tue May 22 13:52:30 2012] [                          SQLITE3] checking notes table
    [Tue May 22 13:52:30 2012] [                          SQLITE3] creating notes table
    [Tue May 22 13:52:30 2012] [                          SQLITE3] error creating table notes - table notes already exists
    [Tue May 22 13:52:30 2012] [                            GHOST] attempting to find local IP addresses
    [Tue May 22 13:52:30 2012] [                            GHOST] local IP address #1 is [192.168.0.100]
    [Tue May 22 13:52:30 2012] [                            GHOST] local IP address #2 is [127.0.0.1]
    [Tue May 22 13:52:30 2012] [                            GHOST] acting as Warcraft III: The Frozen Throne
    [Tue May 22 13:52:30 2012] [                           CONFIG] loading file [ghost.cfg]
    [Tue May 22 13:52:30 2012] [                           CONFIG] loading file [language.cfg]
    [Tue May 22 13:52:30 2012] [                              WTV] WaaaghTV is not enabled.
    [Tue May 22 13:52:30 2012] [                           CONFIG] loading file [hostcounter.cfg]
    [Tue May 22 13:52:30 2012] [                            GHOST] warning - unable to read file [providers.txt]
    [Tue May 22 13:52:30 2012] [                            GHOST] loading file [welcome.txt]
    [Tue May 22 13:52:30 2012] [                            GHOST] loading file [randomgamenames.txt]
    [Tue May 22 13:52:30 2012] [                            GHOST] warning - unable to read file [channelwelcome.txt]
    [Tue May 22 13:52:30 2012] [                            GHOST] warning - unable to read file [mars.txt]
    [Tue May 22 13:52:30 2012] [                            GHOST] found battle.net connection #1 for server [playground.ru]
    [Tue May 22 13:52:30 2012] [                            GHOST] using system locale of 1049
    [Tue May 22 13:52:30 2012] [                            GHOST] found battle.net connection #2 for server [europe.battle.net]
    [Tue May 22 13:52:30 2012] [                            GHOST] using system locale of 1049
    [Tue May 22 13:52:30 2012] [                            GHOST] found battle.net connection #3 for server [w3.gamergrad.ru]
    [Tue May 22 13:52:30 2012] [                            GHOST] using system locale of 1049
    [Tue May 22 13:52:30 2012] [                            GHOST] loading MPQ file [C:\Warcraft III 1.26\War3Patch.mpq]
    [Tue May 22 13:52:30 2012] [                            GHOST] extracting Scripts\common.j from MPQ file to [mapcfgs\common.j]
    [Tue May 22 13:52:30 2012] [                            GHOST] extracting Scripts\blizzard.j from MPQ file to [mapcfgs\blizzard.j]
    [Tue May 22 13:52:30 2012] [                            GHOST] adding ".cfg" to default map -> new default is [map.cfg]
    [Tue May 22 13:52:30 2012] [                           CONFIG] loading file [mapcfgs\map.cfg]
    [Tue May 22 13:52:30 2012] [                             UTIL] warning - unable to read file [C:\Warcraft III 1.26\maps\download\Maps\Download\DotA v6.71b.w3x]
    [Tue May 22 13:52:30 2012] [                              MAP] warning - unable to load MPQ file [C:\Warcraft III 1.26\maps\download\Maps\Download\DotA v6.71b.w3x]
    [Tue May 22 13:52:30 2012] [                              MAP] no map data available, using config file for map_size, map_info, map_crc, map_sha1
    [Tue May 22 13:52:30 2012] [                              MAP] no map data available, using config file for map_options, map_width, map_height, map_slot<x>, map_numplayers, map_numteams
    [Tue May 22 13:52:30 2012] [                              MAP] invalid map_path detected
    [Tue May 22 13:52:30 2012] [                              MAP] invalid map_size detected
    [Tue May 22 13:52:30 2012] [                              MAP] invalid map_info detected
    [Tue May 22 13:52:30 2012] [                              MAP] invalid map_crc detected
    [Tue May 22 13:52:30 2012] [                              MAP] invalid map_sha1 detected
    [Tue May 22 13:52:30 2012] [                              MAP] invalid map_width detected
    [Tue May 22 13:52:30 2012] [                              MAP] invalid map_height detected
    [Tue May 22 13:52:30 2012] [                              MAP] invalid map_numplayers detected
    [Tue May 22 13:52:30 2012] [                              MAP] invalid map_numteams detected
    [Tue May 22 13:52:30 2012] [                              MAP] invalid map_slot<x> detected
    [Tue May 22 13:52:30 2012] [                            GHOST] using hardcoded admin game map
    [Tue May 22 13:52:30 2012] [                              MAP] using hardcoded Emerald Gardens map data for Warcraft 3 version 1.24 & 1.24b
    [Tue May 22 13:52:30 2012] [                           CONFIG] loading file [mapcfgs\DotA v6.74c.cfg]
    [Tue May 22 13:52:30 2012] [                              MAP] loading MPQ file [C:\Warcraft III 1.26\maps\download\DotA v6.74c.w3x]
    [Tue May 22 13:52:30 2012] [                              MAP] calculated map_size = 188 38 127 0
    [Tue May 22 13:52:30 2012] [                              MAP] calculated map_info = 102 217 48 5
    [Tue May 22 13:52:31 2012] [                              MAP] calculated map_crc = 226 241 142 134
    [Tue May 22 13:52:31 2012] [                              MAP] calculated map_sha1 =  254 25 231 241 113 209 228 6 139 151 225 38 179 199 30 30 136 156 164 240
    [Tue May 22 13:52:31 2012] [                              MAP] calculated map_options = 96
    [Tue May 22 13:52:31 2012] [                              MAP] calculated map_width = 118 0
    [Tue May 22 13:52:31 2012] [                              MAP] calculated map_height = 120 0
    [Tue May 22 13:52:31 2012] [                              MAP] calculated map_numplayers = 10
    [Tue May 22 13:52:31 2012] [                              MAP] calculated map_numteams = 2
    [Tue May 22 13:52:31 2012] [                              MAP] found 10 slots
    [Tue May 22 13:52:31 2012] [                              MAP] overriding calculated map_size with config value map_size = 188 38 127 0
    [Tue May 22 13:52:31 2012] [                              MAP] overriding calculated map_info with config value map_info = 102 217 48 5
    [Tue May 22 13:52:31 2012] [                              MAP] overriding calculated map_crc with config value map_crc = 226 241 142 134
    [Tue May 22 13:52:31 2012] [                              MAP] overriding calculated map_sha1 with config value map_sha1 = 254 25 231 241 113 209 228 6 139 151 225 38 179 199 30 30 136 156 164 240
    [Tue May 22 13:52:31 2012] [                              MAP] overriding calculated map_width with config value map_width = 118 0
    [Tue May 22 13:52:31 2012] [                              MAP] overriding calculated map_height with config value map_height = 120 0
    [Tue May 22 13:52:31 2012] [                              MAP] overriding calculated map_numplayers with config value map_numplayers = 10
    [Tue May 22 13:52:31 2012] [                              MAP] overriding calculated map_numteams with config value map_numteams = 2
    [Tue May 22 13:52:31 2012] [                              MAP] overriding slots
    [Tue May 22 13:52:31 2012] [                           CONFIG] loading file [ips.cfg]
    [Tue May 22 13:52:31 2012] [                            GHOST] started loading [ips.dbs]
    [Tue May 22 13:52:31 2012] [                            GHOST] iptocountry loading finished in 687 ms
    [Tue May 22 13:52:31 2012] [                            GHOST] creating admin game
    [Tue May 22 13:52:31 2012] [         GAME: GHost++ Admin Game] loading IP blacklist file [ipblacklist.txt]
    [Tue May 22 13:52:31 2012] [         GAME: GHost++ Admin Game] loaded 0 lines from IP blacklist file
    [Tue May 22 13:52:31 2012] [         GAME: GHost++ Admin Game] attempting to bind to all available addresses
    [Tue May 22 13:52:31 2012] [         GAME: GHost++ Admin Game] listening on port 6116
    [Tue May 22 13:52:31 2012] [                            GHOST] Listening for game broadcasters on port [8123]
    [Tue May 22 13:52:31 2012] [                            GHOST] brtGHost Version (1.7.0.9 r151) (with MySQL support)
    [Tue May 22 13:52:31 2012] [                            GHOST] listening for GProxy++ reconnects on port 6114
    [Tue May 22 13:52:31 2012] [              BNET: playground.ru] refreshed ban list (0 -> 4543 bans)
    [Tue May 22 13:52:31 2012] [              BNET: playground.ru] connecting to server [playground.ru] on port 6112
    [Tue May 22 13:52:31 2012] [              BNET: playground.ru] resolved and cached server IP address 212.42.38.154
    [Tue May 22 13:52:31 2012] [                     BNET: Europe] refreshed ban list (0 -> 2293 bans)
    [Tue May 22 13:52:31 2012] [                     BNET: Europe] connecting to server [europe.battle.net] on port 6112
    [Tue May 22 13:52:31 2012] [                     BNET: Europe] resolved and cached server IP address 213.248.106.68
    [Tue May 22 13:52:31 2012] [            BNET: w3.gamergrad.ru] refreshed ban list (0 -> 88 bans)
    [Tue May 22 13:52:31 2012] [            BNET: w3.gamergrad.ru] connecting to server [w3.gamergrad.ru] on port 6112
    [Tue May 22 13:52:31 2012] [            BNET: w3.gamergrad.ru] resolved and cached server IP address 95.170.190.48
    [Tue May 22 13:52:31 2012] [              BNET: playground.ru] connected
    [Tue May 22 13:52:31 2012] [                     BNET: Europe] connected
    [Tue May 22 13:52:32 2012] [            BNET: w3.gamergrad.ru] connected
    [Tue May 22 13:52:32 2012] [              BNET: playground.ru] attempting to auth as Warcraft III: The Frozen Throne
    [Tue May 22 13:52:32 2012] [                     BNET: Europe] attempting to auth as Warcraft III: The Frozen Throne
    [Tue May 22 13:52:32 2012] [            BNET: w3.gamergrad.ru] attempting to auth as Warcraft III: The Frozen Throne
    [Tue May 22 13:52:33 2012] [              BNET: playground.ru] cd keys accepted
    [Tue May 22 13:52:33 2012] [                     BNET: Europe] cd keys accepted
    [Tue May 22 13:52:33 2012] [            BNET: w3.gamergrad.ru] cd keys accepted
    [Tue May 22 13:52:33 2012] [              BNET: playground.ru] username [Magmor] accepted
    [Tue May 22 13:52:33 2012] [              BNET: playground.ru] using pvpgn logon type (for pvpgn servers only)
    [Tue May 22 13:52:33 2012] [              BNET: playground.ru] logon successful
    [Tue May 22 13:52:33 2012] [              BNET: playground.ru] joining channel [Magma]
    [Tue May 22 13:52:33 2012] [                     BNET: Europe] username [Magmor] accepted
    [Tue May 22 13:52:33 2012] [                     BNET: Europe] using battle.net logon type (for official battle.net servers only)
    [Tue May 22 13:52:33 2012] [              BNET: playground.ru] joined channel [Magma]
    [Tue May 22 13:52:33 2012] [              INFO: playground.ru] Hello Magmor, welcome to Rubattle.net!
    [Tue May 22 13:52:33 2012] [              INFO: playground.ru] This server is hosted by RopNet.
    [Tue May 22 13:52:33 2012] [              INFO: playground.ru]  
    [Tue May 22 13:52:33 2012] [              INFO: playground.ru] There are currently 1790 users in 291 games of Warcraft III Frozen Throne, and 2373 users in 552 games and 104 channels.
    [Tue May 22 13:52:33 2012] [              INFO: playground.ru] You have no mail.
    [Tue May 22 13:52:33 2012] [             ERROR: playground.ru] All accounts that was played with cheats will be erased!
    [Tue May 22 13:52:33 2012] [                     BNET: Europe] logon successful
    [Tue May 22 13:52:33 2012] [            BNET: w3.gamergrad.ru] username [Magmor] accepted
    [Tue May 22 13:52:33 2012] [            BNET: w3.gamergrad.ru] using pvpgn logon type (for pvpgn servers only)
    [Tue May 22 13:52:33 2012] [             ERROR: playground.ru] Any advertise/discussion about cheats and resources that contains/supports illegal software, including cheat-based servers, are strongly prohibited and will lead to account closure. You are warned.
    [Tue May 22 13:52:33 2012] [              INFO: playground.ru] Technical support: support@rubattle.net
    [Tue May 22 13:52:33 2012] [              INFO: playground.ru] Enjoy!
    [Tue May 22 13:52:33 2012] [              INFO: playground.ru] Last login: Tue May 22 13:51 2012
    [Tue May 22 13:52:33 2012] [                     BNET: Europe] joining channel [Magma]
    [Tue May 22 13:52:33 2012] [            BNET: w3.gamergrad.ru] logon successful
    [Tue May 22 13:52:34 2012] [                     BNET: Europe] joined channel [magma]
    [Tue May 22 13:52:34 2012] [            BNET: w3.gamergrad.ru] joined channel [Magma]
    [Tue May 22 13:52:34 2012] [            INFO: w3.gamergrad.ru] you are now tempOP for this channel
    [Tue May 22 13:52:34 2012] [            INFO: w3.gamergrad.ru] Привет Magmor, добро пожаловать на w3.gamergrad.ru
    [Tue May 22 13:52:34 2012] [            INFO: w3.gamergrad.ru] Версия сервера PvPGN BnetD Mod 1.8.5
    [Tue May 22 13:52:34 2012] [            INFO: w3.gamergrad.ru] Сервер хостит xaoc
    [Tue May 22 13:52:34 2012] [            INFO: w3.gamergrad.ru]  
    [Tue May 22 13:52:34 2012] [            INFO: w3.gamergrad.ru] На сервере 4274 игровых аккаунтов.
    [Tue May 22 13:52:34 2012] [            INFO: w3.gamergrad.ru] Сейчас 78 игроков в 41 играх Warcraft III Frozen Throne,
    [Tue May 22 13:52:34 2012] [            INFO: w3.gamergrad.ru] Не знакомы команды чата? Введите команду /help,
    [Tue May 22 13:52:34 2012] [            INFO: w3.gamergrad.ru] для вывода всех команд.
    [Tue May 22 13:52:34 2012] [            INFO: w3.gamergrad.ru]  
    [Tue May 22 13:52:34 2012] [            INFO: w3.gamergrad.ru]  
  2. Deals Старожила

    Сообщения:
    784
    Спасибы:
    21
    Сборка бота GHost:
    Ghost One 1.7.266
    Skype:
    Мой статус
    А до патча норм было? Или сразу скачал бота, поставил патч, скомпилил и запустил?
  3. Magm0r Ньюфаг

    Сообщения:
    3
    Спасибы:
    0

    Да нет, регулярно уже полторы недели данную версию использую, почти чистый бот, тестил на гхостоне данный патч, работает, как часы, а вот в брт что-то не хочет
  4. Deals Старожила

    Сообщения:
    784
    Спасибы:
    21
    Сборка бота GHost:
    Ghost One 1.7.266
    Skype:
    Мой статус
    Скинь как вставлял...
    Т.е. со строками выше и ниже...
  5. Magm0r Ньюфаг

    Сообщения:
    3
    Спасибы:
    0

    bnet.cpp
    Код:
    				//
    				// !MUTE
    				// !M
    				//
    
    				else if( ( Command == "mute" || Command == "m" ) && !Payload.empty( ) && m_GHost->m_CurrentGame)
    				{
    					CGamePlayer *LastMatch = NULL;
    					uint32_t Matches = m_GHost->m_CurrentGame->GetPlayerFromNamePartial( Payload, &LastMatch );
    
    					if( Matches == 0 )
    						QueueChatCommand( tr("lang_1131"), User, Whisper ); // "no match found!
    					else if( Matches == 1 )
    					{
    						string MuteName = LastMatch->GetName();
    						QueueChatCommand( tr("lang_0997", "$USER$", MuteName ), User, Whisper ); // AddedPlayerToTheMuteList
    						m_GHost->m_CurrentGame->AddToMuted( MuteName);
    					}
    					//				else // Unable to mute, more than one match found
    				}
    
    				//
    				 // !RANDOM (random game name from randomgamenames.txt)
     //
    
     if( Command == "random" )
     {
     if (Payload.empty())
     m_GHost->m_ActiveRGN = !m_GHost->m_ActiveRGN;
     if (!Payload.empty())
     {
     transform( Payload.begin( ), Payload.end( ), Payload.begin( ), (int(*)(int))tolower );
     if (Payload == "on")
     m_GHost->m_ActiveRGN = true;
     else
     m_GHost->m_ActiveRGN = false;
     }
     if (m_GHost->m_ActiveRGN)
     QueueChatCommand( "Random Game Names ON", User, Whisper);
     else
     QueueChatCommand( "Random Game Names OFF", User, Whisper);
     }
    
     //
    				// !REHOSTDELAY
    				// !RD
    				//
    
    				else if ( ( Command == "rehostdelay" || Command == "rd" ) )
    				{
    					if (Payload.empty())
    						QueueChatCommand( tr("lang_1132", "$DELAY$", UTIL_ToString(m_GHost->m_AutoRehostDelay) ) , User, Whisper); //  "rehostdelay is set to "+ UTIL_ToString(m_GHost->m_AutoRehostDelay)
    					else
    					{
    						m_GHost->m_AutoRehostDelay = UTIL_ToUInt32(Payload);
    						QueueChatCommand(tr("lang_1132", "$DELAY$", Payload), User, Whisper);
    					}
    				}
    
    
    				//
    				// !HOLDS (hold a specified slot for someone)
    				// !HS
    				//
    
    ghost.cpp
    Код:
    	// update battle.net connections
    
    	for( vector<CBNET *> :: iterator i = m_BNETs.begin( ); i != m_BNETs.end( ); i++ )
    	{
    		if( (*i)->Update( &fd, &send_fd ) )
    			BNETExit = true;
    	}
    
    	// autohost
    
    	if( !m_AutoHostGameName.empty( ) && m_AutoHostMaximumGames != 0 && m_AutoHostAutoStartPlayers != 0 && GetTime( ) - m_LastAutoHostTime >= 30 )
    	{
    		// copy all the checks from CGHost :: CreateGame here because we don't want to spam the chat when there's an error
    		// instead we fail silently and try again soon
    
    		if( !m_ExitingNice && m_Enabled && !m_CurrentGame && m_Games.size( ) < m_MaxGames && m_Games.size( ) < m_AutoHostMaximumGames )
    		{
    			if( m_AutoHostMap->GetValid( ) )
    			{
     if ( !m_RandomGameNames.empty( ) && m_ActiveRGN )
     {
     if ( m_RandomGameNamesTemp.empty( ) )
     m_RandomGameNamesTemp = m_RandomGameNames;
     unsigned int rgnn;
     srand((unsigned)time(0));
     rgnn = (rand()%m_RandomGameNamesTemp.size( ));
     m_AutoHostGameName = m_RandomGameNamesTemp.at(rgnn);
     m_RandomGameNamesTemp.erase (m_RandomGameNamesTemp.begin() + rgnn);
     }
    				string GameName = m_AutoHostGameName + " #" + UTIL_ToString( m_HostCounter );
    
    				if( GameName.size( ) <= 31 )
    				{
    					m_AutoHosted = true;
    					CreateGame( m_AutoHostMap, GAME_PUBLIC, false, GameName, m_AutoHostOwner, m_AutoHostOwner, m_AutoHostServer, false );
    					m_AutoHosted = false;
    
    					if( m_CurrentGame )
    					{
    						m_CurrentGame->SetAutoStartPlayers( m_AutoHostAutoStartPlayers );
    
    						if( m_AutoHostMatchMaking )
    						{
    							if( !m_Map->GetMapMatchMakingCategory( ).empty( ) )
    							{
    								if( !( m_Map->GetMapOptions( ) & MAPOPT_FIXEDPLAYERSETTINGS ) )
    									CONSOLE_Print( "[GHOST] autohostmm - map_matchmakingcategory [" + m_Map->GetMapMatchMakingCategory( ) + "] found but matchmaking can only be used with fixed player settings, matchmaking disabled" );
    								else
    								{
    									CONSOLE_Print( "[GHOST] autohostmm - map_matchmakingcategory [" + m_Map->GetMapMatchMakingCategory( ) + "] found, matchmaking enabled" );
    
    									m_CurrentGame->SetMatchMaking( true );
    									m_CurrentGame->SetMinimumScore( m_AutoHostMinimumScore );
    									m_CurrentGame->SetMaximumScore( m_AutoHostMaximumScore );
    								}
    							}
    							else
    								CONSOLE_Print( "[GHOST] autohostmm - map_matchmakingcategory not found, matchmaking disabled" );
    						}
    					}
    				}
    				else
    				{
    					CONSOLE_Print( "[GHOST] stopped auto hosting, next game name [" + GameName + "] is too long (the maximum is 31 characters)" );
    					m_AutoHostGameName.clear( );
    					m_AutoHostOwner.clear( );
    					m_AutoHostServer.clear( );
    					m_AutoHostMaximumGames = 0;
    					m_AutoHostAutoStartPlayers = 0;
    					m_AutoHostMatchMaking = false;
    					m_AutoHostMinimumScore = 0.0;
    					m_AutoHostMaximumScore = 0.0;
    				}
    			}
    			else
    			{
    				CONSOLE_Print( "[GHOST] stopped auto hosting, map config file [" + m_AutoHostMap->GetCFGFile( ) + "] is invalid" );
    				m_AutoHostGameName.clear( );
    				m_AutoHostOwner.clear( );
    				m_AutoHostServer.clear( );
    				m_AutoHostMaximumGames = 0;
    				m_AutoHostAutoStartPlayers = 0;
    				m_AutoHostMatchMaking = false;
    				m_AutoHostMinimumScore = 0.0;
    				m_AutoHostMaximumScore = 0.0;
    			}
    		}
    
    		m_LastAutoHostTime = GetTime( );
    	}
    
    	CTCPSocket *cNewSocket = m_GameBroadcastersListener->Accept( &fd );
    	if ( cNewSocket )
    	{
    		m_GameBroadcasters.push_back( cNewSocket );
    		CONSOLE_Print("[GHOST] Game Broadcaster [" + cNewSocket->GetIPString( ) +"] connected" );
    	}
    	for(vector<CTCPSocket * >::iterator i = m_GameBroadcasters.begin( ); i!= m_GameBroadcasters.end( ); )
    	{
    		if ( (*i)->HasError( ) || !(*i)->GetConnected( ) )
    		{
    			CONSOLE_Print("[GHOST] Game Broadcaster [" + (*i)->GetIPString( ) +"] disconnected");
    			delete *i;
    			i = m_GameBroadcasters.erase( i );
    			continue;
    		}
    		(*i)->DoSend( &send_fd );
    		i++;
    	}
    
    	return m_Exiting || AdminExit || BNETExit;
    }
    
    void CGHost :: EventBNETConnecting( CBNET *bnet )
    {
    	if( m_AdminGame)
    		m_AdminGame->SendAllChat( m_Language->GetLang( "lang_0105", bnet->GetServer( ) ) ); // ConnectingToBNET
    
    	if( m_CurrentGame ) 
    		m_CurrentGame->SendAllChat( m_Language->GetLang( "lang_0105", bnet->GetServer( ) ) ); // ConnectingToBNET
    	
    }
    
    void CGHost :: EventBNETConnected( CBNET *bnet )
    {
    	if( m_AdminGame)
    		m_AdminGame->SendAllChat( m_Language->GetLang( "lang_0105", bnet->GetServer( ) ) ); // ConnectedToBNET
    
    	if( m_CurrentGame )
    		m_CurrentGame->SendAllChat( m_Language->GetLang( "lang_0105", bnet->GetServer( ) ) ); // ConnectedToBNET
    	
    }
    
    void CGHost :: EventBNETDisconnected( CBNET *bnet )
    {
    	if( m_AdminGame)
    		m_AdminGame->SendAllChat( m_Language->GetLang("lang_0107", bnet->GetServer( ) ) ); // DisconnectedFromBNET
    
    
    	if( m_CurrentGame )
    		m_CurrentGame->SendAllChat( m_Language->GetLang("lang_0107", bnet->GetServer( ) ) ); // DisconnectedFromBNET
    		
    }
    
    void CGHost :: EventBNETLoggedIn( CBNET *bnet )
    {
    	if( m_AdminGame)
    		m_AdminGame->SendAllChat( m_Language->GetLang("lang_01

    еще оттуда же
    Код:
    	m_ReplayPath = FixPath(m_ReplayPath, sPathEnd);
    	m_HideIPAddresses = CFG->GetInt( "bot_hideipaddresses", 0 ) == 0 ? false : true;
    	m_RefreshMessages = CFG->GetInt( "bot_refreshmessages", 0 ) == 0 ? false : true;
    	m_SpoofChecks = CFG->GetInt( "bot_spoofchecks", 2 );
    	m_RequireSpoofChecks = CFG->GetInt( "bot_requirespoofchecks", 0 ) == 0 ? false : true;
    	m_AutoLock = CFG->GetInt( "bot_autolock", 0 ) == 0 ? false : true;
    	m_AutoSave = CFG->GetInt( "bot_autosave", 0 ) == 0 ? false : true;
    	m_AllowDownloads = CFG->GetInt( "bot_allowdownloads", 0 );
    	m_PingDuringDownloads = CFG->GetInt( "bot_pingduringdownloads", 0 ) == 0 ? false : true;
    	m_LCPings = CFG->GetInt( "bot_lcpings", 1 ) == 0 ? false : true;
    	m_AutoKickPing = CFG->GetInt( "bot_autokickping", 400 );
    	m_IPBlackListFile = CFG->GetString( "bot_ipblacklistfile", "ipblacklist.txt" );
    	m_ReconnectWaitTime = CFG->GetInt( "bot_reconnectwaittime", 3 );
    	m_ReplaceBanWithWarn = CFG->GetInt( "bot_replacebanwithwarn", 0 ) == 0 ? false : true;
    	m_BlueCanHCL = CFG->GetInt( "bot_bluecanhcl", 0 ) == 0 ? false : true;
    	m_BlueIsOwner = CFG->GetInt( "bot_blueisowner", 0 ) == 0 ? false : true;
    	m_ActiveRGN = CFG->GetInt( "bot_autohostrandomgamename", 0 ) == 0 ? false : true;
    	m_NormalCountdown = CFG->GetInt( "bot_normalcountdown", 0 ) == 0 ? false : true;
    	m_DetourAllMessagesToAdmins = false;
    	m_UnbanRemovesChannelBans = CFG->GetInt( "bot_unbanremoveschannelban", 0 ) == 0 ? false : true;
    	m_WhisperAllMessages = CFG->GetInt( "bot_whisperallmessages", 1 ) == 0 ? false : true;
    	m_Latency = CFG->GetInt( "bot_latency", 100 );
    	m_UseDynamicLatency = CFG->GetInt( "bot_usedynamiclatency", 1 ) == 0 ? false : true;
    	m_DynamicLatency2xPingMax = CFG->GetInt( "bot_dynamiclatency2.2xhighestpingmax", 1 ) == 0 ? false : true;
    	m_DynamicLatencyMaxToAdd = CFG->GetInt( "bot_dynamiclatencymaxtoadd", 30 );
    	m_DynamicLatencyAddedToPing = CFG->GetInt( "bot_dynamiclatencyaddedtoping", 25 );
    	m_DynamicLatencyIncreasewhenLobby = CFG->GetInt( "bot_dynamiclatencyincreasewhenlobby", 1 ) == 0 ? false : true;
    	m_SyncLimit = CFG->GetInt( "bot_synclimit", 50 );
    	m_VoteKickAllowed = CFG->GetInt( "bot_votekickallowed", 1 ) == 0 ? false : true;
    	m_VoteKickPercentage = CFG->GetInt( "bot_votekickpercentage", 100 );
    	m_LanAdmins = CFG->GetInt( "bot_lanadmins", 0 ) == 0 ? false : true;
    	m_LanRootAdmins = CFG->GetInt( "bot_lanrootadmins", 0 ) == 0 ? false : true;
    и еще
    Код:
    	ReadProviders();
    	size_t f;
    	providersn.clear();
    	providers.clear();
    	for(uint32_t i=0; i<m_Providers.size(); i++)
    	{
    		f = m_Providers[i].find("=");
    		if (f!=string :: npos)
    		{
    			providersn.push_back(m_Providers[i].substr(0,f));
    			providers.push_back(m_Providers[i].substr(f+1,500));
    		}
    	}
    	ReadWelcome();
    	ReadRandomGameName();
    	ReadChannelWelcome();
    	ReadMars();
    }
    
    void CGHost :: ReadChannelWelcome ()
    {
    	string file = "channelwelcome.txt";
    	ifstream in;
    	in.open( file.c_str( ) );
    	m_ChannelWelcome.clear();
    	if( in.fail( ) )
    		CONSOLE_Print( "[GHOST] warning - unable to read file [" + file + "]" );
    	else
    	{
    		CONSOLE_Print( "[GHOST] loading file [" + file + "]" );
    		string Line;
    
    		while( !in.eof( ) )
    		{
    			getline( in, Line );
    
    			// ignore blank lines and comments
    
    			if( Line.empty( ) || Line[0] == '#' )
    				continue;
    			m_ChannelWelcome.push_back(Line);
    		}
    	}
    	in.close( );
    }
    
    void CGHost :: ReadProviders ()
    {
    	string file = "providers.txt";
    	ifstream in;
    	in.open( file.c_str( ) );
    	m_Providers.clear();
    	if( in.fail( ) )
    		CONSOLE_Print( "[GHOST] warning - unable to read file [" + file + "]" );
    	else
    	{
    		CONSOLE_Print( "[GHOST] loading file [" + file + "]" );
    		string Line;
    
    		while( !in.eof( ) )
    
    Код:
    	}
    	in.close( );
    }
    
    void CGHost :: ReadWelcome ()
    {
    	string file = "welcome.txt";
    	ifstream in;
    	in.open( file.c_str( ) );
    	m_Welcome.clear();
    	if( in.fail( ) )
    		CONSOLE_Print( "[GHOST] warning - unable to read file [" + file + "]" );
    	else
    	{
    		CONSOLE_Print( "[GHOST] loading file [" + file + "]" );
    		string Line;
    
    		while( !in.eof( ) )
    		{
    			getline( in, Line );
    
    			// ignore blank lines and comments
    
    			if( Line.empty( ) || Line[0] == '#' )
    				continue;
    			m_Welcome.push_back(Line);
    		}
    	}
    	in.close( );
    }
    
    void CGHost :: ReadRandomGameName ()
    {
     string file = "randomgamenames.txt";
     ifstream in;
     in.open( file.c_str( ) );
     m_RandomGameNames.clear();
     if( in.fail( ) )
     CONSOLE_Print( "[GHOST] warning - unable to read file [" + file + "]" );
     else
     {
     CONSOLE_Print( "[GHOST] loading file [" + file + "]" );
     string Line;
    
     while( !in.eof( ) )
     {
     getline( in, Line );
    
     // ignore blank lines
     if( Line.empty( ) )
     continue;
     m_RandomGameNames.push_back(Line);
     }
     }
     in.close( );
    }
    
    string CGHost :: GetMars ()
    {
    	if (m_Mars.size()==0)
    		return string();
    	bool ok = true;
    	// delete the oldest message
    	if (m_MarsLast.size()>=m_Mars.size() || m_MarsLast.size()>15)
    	if (m_MarsLast.size()>0)
    		m_MarsLast.erase(m_MarsLast.begin());
    	do
    	{
    		ok = true;
    		random_shuffle( m_Mars.begin( ), m_Mars.end( ) );
    		for (uint32_t i = 0; i<m_MarsLast.size(); i++)
    		{
    			if (m_MarsLast[i]==m_Mars[0])
    			{
    				ok = false;
    				break;
    			}
    		}
    	} while (!ok);
    
    	m_MarsLast.push_back(m_Mars[0]);
    	return m_Mars[0];
    }
    
    void CGHost :: ReadMars ()
    
    ghost.h
    Код:
    	string m_AdminGamePassword;				// config value: the admin game password
    	string m_AdminGameMap;					// config value: the admin game map config to use
    	unsigned char m_LANWar3Version;			// config value: LAN warcraft 3 version
    	uint32_t m_ReplayWar3Version;			// config value: replay warcraft 3 version (for saving replays)
    	uint32_t m_ReplayBuildNumber;			// config value: replay build number (for saving replays)
    	bool m_TCPNoDelay;						// config value: use Nagle's algorithm or not
    	uint32_t m_MatchMakingMethod;			// config value: the matchmaking method
    	bool m_ForceAutoBalanceTeams;			// config value: force auto balance teams with score
    
    	bool m_Verbose;							// config value: show all info or just some
    	bool m_RelayChatCommands;				// config value: show/hide issued commands
    	bool m_ActiveRGN;                       // config value: random game names
    	bool m_BlueCanHCL;
    	bool m_BlueIsOwner;
    	bool m_ReplaceBanWithWarn;
    	bool m_forceautohclindota;
    	bool m_PlaceAdminsHigherOnlyInDota;
    	bool m_AutoStartDotaGames;
    	double m_AllowedScores;
    	double m_AutoHostAllowedScores;
    	bool m_AllowNullScoredPlayers;
    
    Код:
    	bool m_AutoStartDotaGames;
    	double m_AllowedScores;
    	double m_AutoHostAllowedScores;
    	bool m_AllowNullScoredPlayers;
    	bool m_QuietRehost;
    	bool m_CalculatingScores;
    	string DBType;
    	bool m_UpdateDotaEloAfterGame;
    	bool m_UpdateDotaScoreAfterGame;
    	string m_LastGameName;
    	string m_ExternalIP;					// our external IP
    	uint32_t m_ExternalIPL;					// our external IP long format
    	string m_Country;						// our country
    	string m_wtvPath;
    	string m_wtvPlayerName;
    	bool m_wtv;
    	bool m_ForceLoadInGame;
    	bool m_ShowRealSlotCount;
    	vector<string> m_RandomGameNames;       // after start doesn't change
        vector<string> m_RandomGameNamesTemp;   // change after start
    	vector<string> m_CachedSpoofedIPs;
    	vector<string> m_CachedSpoofedNames;
    	vector<string> m_Providers;				//
    	vector<string> m_Welcome;				// our welcome message
    	vector<string> m_ChannelWelcome;				// our welcome message
    	vector<string> m_Mars;					// our mars messages
    	vector<string> m_MarsLast;				// our last mars messages
    	uint32_t m_ChannelJoinTime;				// when we enter a channel
    	bool m_NewChannel;            		  	// did we enter a channel
    	vector<string> m_UDPUsers;				// our udp users
    	vector<string> m_IPUsers;
    	string m_LastIp;						// our last udp command is comming from this ip
    	uint32_t m_IPBanning;					// config value: handle ip bans
    	uint32_t m_Banning;						// config value: handle name bans
    Код:
    	bool newGameCountry2Check;
    	string newGameCountries;
    	string newGameCountries2;
    	unsigned char newGameGameState;
    	string newGameName;
    	bool newGameGArena;
    	uint32_t m_LobbyTimeLimit;
    	uint32_t m_LobbyTimeLimitMax;
    	
    //	bool m_dbopen;
    
    	CGHost( CConfig *CFG );
    	~CGHost( );
    
    	string Commands(unsigned int idx);
    	bool CommandAllowedToShow( string c);
    	void ReadProviders();
    	void ReadWelcome();
    	void ReadRandomGameName();
    	void ReadChannelWelcome();
    	void ReadMars();
    	string GetMars();
    	void SetTimerResolution();
    	void EndTimer();
    	void AdminGameMessage(string name, string message);
    
    	bool ShouldFakePing(string name);
    	bool IsRootAdmin(string name);
    	void AddRootAdmin(string name);
    	void DelRootAdmin(string name);
    	void ReloadConfig();
    
    	uint32_t CMDAccessAddOwner (uint32_t acc);
    	uint32_t CMDAccessAllOwner ();
    	uint32_t CMDAccessAdd( uint32_t access, uint32_t acc);
    	uint32_t CMDAccessDel( uint32_t access, uint32_t acc);
    Куски где и зона где он вставлен у меня, зарание спс )
  6. Deals Старожила

    Сообщения:
    784
    Спасибы:
    21
    Сборка бота GHost:
    Ghost One 1.7.266
    Skype:
    Мой статус
    Собирай в дебаге, запускай тоже в дебаге и смотри где вылет идет.
  7. fenlod Наш человек

    Сообщения:
    104
    Спасибы:
    3
    Дата начала использования бота:
    12.12.2008
    Как я понял если в ghost.cfg bot_autohclfromgamename = 1
    и я сделаю названия например
    LOD -mdfcpsso
    OMG -sdfcpsso
    LOd -apfcpsso
    БОт будет брать мод из названия или нет?
  8. VladGod2 Парнишка с небывалым умом

    Сообщения:
    228
    Спасибы:
    4
    Сборка бота GHost:
    Ghost One 1.7.266
    Дата начала использования бота:
    01.01.00
    Skype:
    Мой статус
    ты компилил то что описывалось выше? -_-
  9. fenlod Наш человек

    Сообщения:
    104
    Спасибы:
    3
    Дата начала использования бота:
    12.12.2008
    а всё проверил бирёт)
  10. Doterok Старожила

    Сообщения:
    923
    Спасибы:
    171
    Сборка бота GHost:
    Ghost ++ 17.2
    Дата начала использования бота:
    2011
    а для brt бота можно такой патчик?:)
    этот пробовал компиляция ошибок не дала,но кикает с лобби при попытки зайти
  11. rost Гуру

    Сообщения:
    1.258
    Спасибы:
    150
    Сборка бота GHost:
    LtG
    Дата начала использования бота:
    01.11.2010
    Skype:
    Мой статус
    у меня норм стоит все
  12. Doterok Старожила

    Сообщения:
    923
    Спасибы:
    171
    Сборка бота GHost:
    Ghost ++ 17.2
    Дата начала использования бота:
    2011
    что менял в данном патче скажи плиз
  13. rost Гуру

    Сообщения:
    1.258
    Спасибы:
    150
    Сборка бота GHost:
    LtG
    Дата начала использования бота:
    01.11.2010
    Skype:
    Мой статус
    ставил как описано
  14. Doterok Старожила

    Сообщения:
    923
    Спасибы:
    171
    Сборка бота GHost:
    Ghost ++ 17.2
    Дата начала использования бота:
    2011
    ну я на твоем лтг боте ставил меня кикало при входе в лобби/
  15. rost Гуру

    Сообщения:
    1.258
    Спасибы:
    150
    Сборка бота GHost:
    LtG
    Дата начала использования бота:
    01.11.2010
    Skype:
    Мой статус
    я ж говорю нету у меня бота (соурса)
    Точнее у вас его нету)