PvPGN (Battle.net)

Опубликовано nekit - вс, 30/09/2012 - 17:01
Спросили меня не так давно - есть ли возможность поднять свой Battle.net на FreeBSD, а если есть, то помочь настроить. Игры, для которых возникла необходимость в собственном сервере, это Starcraft и Warcraft 3. После недолгих поисков было найдено решение в виде PvPGN. PvPGN (Player versus Player Gaming Network), который является модификацией сервера bnetd, эмулирует работу сервера Blizzard Battle.net (TM). Далее я расскажу о том, как его установить и настроить, а так же с какими проблемами я столкнулся в процессе работы с ним. Все действия будут происходить на ОС FreeBSD версии 8.3. Идем в порты и устанавливаем PvPGN. На момент написания статьи в портах доступна версия 1.8.5.
  1. # cd /usr/ports/games/pvpgn
  2. # make install clean
При сборке порта доступны следующие параметры:
  • MYSQL - поддержка хранения данных о пользователях в MySQL.
  • PGSQL - поддержка хранения данных о пользователях в PostgreSQL.
  • SQLITE3 - поддержка хранения данных о пользователях в SQLite3.
  • D2 - собрать сервер для Diablo 2.
Хранить все в базе данных гораздо удобнее, чем хранить все в фалах. На сервере уже стоит СУБД PostgreSQL, поэтому я поставил галочку напротив опции - PGSQL. Остальные опции убрал. После установки в директории /usr/local/etc появится директория pvpgn. В ней будут находиться стандартные конфигурационные файлы с именами вида *-sample. Все эти файлы необходимо переименовать (или скопировать) к виду без -sample. Уже сейчас можно запускать сервер и пробовать подключаться к нему, но есть опции, которые полезно будет посмотреть и возможно изменить. Да и к тому же надо настроить работу с PostgreSQL, ибо в стандартной конфигурации сервер все хранит в файлах. Так же не забываем создать базу данных и пользователя для PvPGN, если вы используете СУБД. Вот так выглядит главный конфигурационный файл /usr/local/etc/pvpgn/bnetd.conf у меня:
  1. ##############################################################################
  2. # bnetd.conf  -  главный конфигурационный файл                               #
  3. #----------------------------------------------------------------------------#
  4. #                                                                            #
  5. # ####################### Обязательно прочтите это ######################### #
  6. # Данный файл содержит стандартную конфигурацию сервера, которая может       #
  7. # использоваться без модификаций для большинства PvPGN установок, но         #
  8. # возможно вам потребуется сделать некоторые изменения согласно вашим        #
  9. # потребностям. Пустые строки и все, что начинается с символа "#"            #
  10. # игнорируется. Заключайте значения для параметров в кавычки, если они       #
  11. # содержат пробелы.                                                          #
  12. #                                                                            #
  13. ##############################################################################
  14.  
  15.  
  16. ##############################################################################
  17. # Пользователь и группа, под которыми будет работать сервер.                 #
  18. # Можно использовать имена или числовые идентификаторы (начинающиеся с '#'). #
  19. # Если ничего не указано, то сервер работает от пользователя, который его    #
  20. # запустил.                                                                  #
  21. #----------------------------------------------------------------------------#
  22.  
  23. # Примечание. Пользователь и группа bnetd создается при установке порта.
  24. effective_user  = bnetd
  25. effective_group = bnetd
  26.  
  27. # effective_user  = #12
  28. # effective_group = #20
  29.  
  30. #                                                                            #
  31. ##############################################################################
  32.  
  33. ##############################################################################
  34. # Настройки хранилища                                                        #
  35. # storage_path говорит pvpgn как и откуда/куда читать/писать информацию о    #
  36. # пользователях. Доступна 2 драйвера: file и sql                             #
  37. #                                                                            #
  38. # Формат:                                                                    #
  39. # * Для простого (plain) драйвера file:                                      #
  40. #  storage_path = file:mode=plain;dir=<path_to_user_files>;clan=<path_to_clan_files>;default=/path/to/default/account #
  41. # * Для cdb драйвера file:                                                   #
  42. #  storage_path = file:mode=cdb;dir=<path_to_cdb_files>;clan=<path_to_clan_files>;default=/path/to/default/account   #
  43. # * Для драйвера sql/sql2:                                                   #
  44. #  storage_path = sql:variable=value;...;default=0 (0 is the default uid)    #
  45. # or storage_path = sql2:variable=value;...;default=0 (0 is the default uid) #
  46. #                                                                            #
  47. # Доступные параметры для sql/sql2:                                          #
  48. # - "mode" : какая БД будет использоваться (mysql/pgsql/etc..)               #
  49. # - "host" : хост, на котором работает БД                                    #
  50. # - "port" : порт                                                            #
  51. # - "socket" : путь до UNIX сокета                                           #
  52. # - "name" : имя базы данных                                                 #
  53. # - "user" : пользователь                                                    #
  54. # - "pass" : пароль                                                          #
  55. # - "default" : UID используемый по умолчанию                                #
  56. # - "prefix" : префикс для имен таблиц (по умолчанию "")                     #
  57. #                                                                            #
  58. # Примеры:                                                                   #
  59. # storage_path = file:mode=plain;dir=/usr/local/share/pvpgn/users;clan=/usr/local/share/pvpgn/clans;team=/usr/local/share/pvpgn/teams;default=/usr/local/etc/pvpgn/bnetd_default_user.plain
  60. # storage_path = file:mode=cdb;dir=/usr/local/share/pvpgn/userscdb;clan=/usr/local/share/pvpgn/clans;team=/usr/local/share/pvpgn/teams;default=/usr/local/etc/pvpgn/bnetd_default_user.cdb
  61. # storage_path = sql:mode=mysql;host=127.0.0.1;name=PVPGN;user=pvpgn;pass=pvpgnrocks;default=0;prefix=pvpgn_
  62. # storage_path = sql:mode=pgsql;host=127.0.0.1;name=pvpgn;user=pvpgn;pass=pvpgnrocks;default=0;prefix=pvpgn_
  63. # storage_path = sql:mode=sqlite3;name=/usr/local/share/pvpgn/users.db;default=0;prefix=pvpgn_
  64. # storage_path = sql:mode=odbc;name=PVPGN;prefix=pvpgn_
  65. #                                                                            #
  66. # Внимание!! вы должны изменить ниже параметр "DBlayoutfile" на              #
  67. # sql_DB_layout2.conf, если используете драйвер "sql2" !!!                   #
  68. # storage_path = sql2:mode=mysql;host=127.0.0.1;name=PVPGN;user=pvpgn;pass=pvpgnrocks;default=0;prefix=pvpgn2_
  69. # storage_path = sql2:mode=pgsql;host=127.0.0.1;name=pvpgn;user=pvpgn;pass=pvpgnrocks;default=0;prefix=pvpgn2_
  70. # storage_path = sql2:mode=sqlite3;name=/usr/local/share/pvpgn/users.db;default=0;prefix=pvpgn2_
  71. # storage_path = sql2:mode=odbc;name=PVPGN;prefix=pvpgn2_
  72. #----------------------------------------------------------------------------#
  73.  
  74. storage_path = sql:mode=pgsql;host=192.168.7.253;name=dbname;user=user;pass=pass;default=0;prefix=pvpgn_
  75.  
  76. #                                                                            #
  77. ##############################################################################
  78.  
  79. ##############################################################################
  80. # Секция, описывающее расположение служебных файлов                          #
  81. # Параметр pidfile может быть установлен в "".                               #
  82. # Используйте полные пути, чтобы избежать проблем!                           #
  83. #----------------------------------------------------------------------------#
  84.  
  85. filedir     = /usr/local/share/pvpgn/files
  86. reportdir   = /usr/local/share/pvpgn/reports
  87. chanlogdir  = /usr/local/share/pvpgn/chanlogs
  88. motdfile    = /usr/local/etc/pvpgn/bnmotd.txt
  89. issuefile   = /usr/local/etc/pvpgn/bnissue.txt
  90. channelfile = /usr/local/etc/pvpgn/channel.conf
  91. newsfile    = /usr/local/etc/pvpgn/news.txt
  92. adfile      = /usr/local/etc/pvpgn/ad.conf
  93. topicfile   = /usr/local/etc/pvpgn/topics.conf
  94. ipbanfile   = /usr/local/etc/pvpgn/bnban.conf
  95. helpfile    = /usr/local/etc/pvpgn/bnhelp.conf
  96. mpqfile     = /usr/local/etc/pvpgn/autoupdate.conf
  97. logfile     = /var/log/pvpgn/bnetd.log
  98. realmfile   = /usr/local/etc/pvpgn/realm.conf
  99. maildir     = /usr/local/share/pvpgn/bnmail
  100. versioncheck_file = /usr/local/etc/pvpgn/versioncheck.conf
  101. mapsfile    = /usr/local/etc/pvpgn/bnmaps.conf
  102. xplevelfile = /usr/local/etc/pvpgn/bnxplevel.conf
  103. xpcalcfile  = /usr/local/etc/pvpgn/bnxpcalc.conf
  104. pidfile    = /var/run/pvpgn/bnetd.pid
  105. ladderdir   = /usr/local/share/pvpgn/ladders
  106. command_groups_file = /usr/local/etc/pvpgn/command_groups.conf
  107. tournament_file = /usr/local/etc/pvpgn/tournament.conf
  108. statusdir   = /usr/local/share/pvpgn/status
  109. aliasfile   = /usr/local/etc/pvpgn/bnalias.conf
  110. anongame_infos_file = /usr/local/etc/pvpgn/anongame_infos.conf
  111. DBlayoutfile = /usr/local/etc/pvpgn/sql_DB_layout.conf
  112. supportfile = /usr/local/etc/pvpgn/supportfile.conf
  113. transfile   = /usr/local/etc/pvpgn/address_translation.conf
  114.  
  115. fortunecmd  = /usr/games/fortune
  116.  
  117. #                                                                            #
  118. ##############################################################################
  119.  
  120.  
  121. ##############################################################################
  122. # Логи                                                                       #
  123. #----------------------------------------------------------------------------#
  124.  
  125. # Может быть определено несколько уровней логирования. Каждый уровень
  126. # отделяется запятой. Доступные уровни логирования:
  127. #   none
  128. #   trace
  129. #   debug
  130. #   info
  131. #   warn
  132. #   error
  133. #   fatal
  134. loglevels = fatal,error,warn
  135. #loglevels = fatal,error,warn,info
  136.  
  137. #                                                                            #
  138. ##############################################################################
  139.  
  140.  
  141. ##############################################################################
  142. # Параметры сервера D2CS                                                     #
  143. #----------------------------------------------------------------------------#
  144.  
  145. # Версия этого сервера D2CS (установите в 0, чтобы отключить проверку версий)
  146. d2cs_version = 0
  147.  
  148. # Разрешить серверу D2CS зменять имена realm?
  149. allow_d2cs_setname = true
  150.  
  151. #                                                                            #
  152. ##############################################################################
  153.  
  154.  
  155. ##############################################################################
  156. # Загружаемые файлы                                                          #
  157. #----------------------------------------------------------------------------#
  158.  
  159. # Об этих именах файлов сообщается непосредственно клиенту и они должны быть
  160. # указаны относительно директории "filedir".
  161. iconfile = "icons.bni"
  162. war3_iconfile = "icons-WAR3.bni"
  163. star_iconfile = "icons_STAR.bni"
  164.  
  165. tosfile = "tos.txt"
  166.  
  167. #                                                                            #
  168. ##############################################################################
  169.  
  170.  
  171. ##############################################################################
  172. # Проверка клиента и обновлений                                              #
  173. #----------------------------------------------------------------------------#
  174.  
  175. # Это список типов клиентов, которым разрешено подключаться к серверу.
  176. # Список должен быть разделен запятой.
  177. # all  : all client types allowed (default)
  178. # chat : client type "CHAT" allowed (used by some bot software)
  179. # dshr : client type Diablo 1 Shareware
  180. # drtl : client type Diablo 1 (Retail)
  181. # sshr : client type Starcraft Shareware
  182. # star : client type Starcraft
  183. # sexp : client type Starcraft Broodwar
  184. # w2bn : client type Warcraft II Battle.Net Edition
  185. # d2dv : client type Diablo 2
  186. # d2xp : client type Diablo 2 LOD
  187. # war3 : client type Warcraft III (Reign Of Chaos)
  188. # w3xp : client type Warcraft III Frozen Throne
  189. #
  190. # Пример: allowed_clients = war3,w3xp
  191. allowed_clients = all
  192.  
  193. # Если эта опция включена, то этап проверки версии клиента будет пропущен.
  194. # Работает только с клиентами < 109. Это может оказаться полезным, потому что
  195. # в этом случае вам больше не понадобятся файлы IX86AUTH?.MPQ и PMACAUTH?.MPQ.
  196. # Учтите, что отключение данной функции повлечет за собой отключение
  197. # функции автоматического обновления.
  198. #
  199. # Если вы выключите данный параметр, то вы должны иметь один или несколько
  200. # MPQ файлов. Иначе клиенты будут зависать при первом подключении, потому что
  201. # будут пытаться загрузить эти файлы. Проверка версий может быть отключена
  202. # только для клиентов с версией ниже 109. Начиная с версии 109 клиенты всегда
  203. # делают проверку версий, так как они не функционируют должным образом, если
  204. # сервер не запрашивает ее.
  205. skip_versioncheck = false
  206.  
  207. # Если вы включили проверку версий, но хотите чтобы клиенты не прошедшие ее
  208. # могли подключиться, то включите данный параметр.
  209. allow_bad_version = false
  210.  
  211. # Если вы включили проверку версий, но  хотите позволить клиентам
  212. # не присутствующим в параметре versioncheck подключаться к серверу,
  213. # то включите этот параметр. Если вы не имеете полного файла (прим. о каком
  214. # идет речь не понятно) или вас не беспокоят читеры, то это хорошая идея
  215. # (включить параметр).
  216. allow_unknown_version = true
  217.  
  218. # Здесь определяется как проверять поле exeinfo в файле versioncheck.
  219. # Вы можете выбрать между: no match at all [none] (default),
  220. # exact match [exact], exact case-sensitive match [exactcase], dumb wildcard
  221. # match [wildcard], and parsed value comparison [parse].
  222. # Учтите: [parse] требует функцию mktime(), которая может быть не в каждой
  223. # системе.
  224. version_exeinfo_match = none
  225.  
  226. # Если выше вы выбрали [parse], то это допуск, на который время может различаться.
  227. # Время указывается в секундах. Если 0, то данная функция выключена.
  228. version_exeinfo_maxdiff = 0
  229.  
  230. #                                                                            #
  231. ##############################################################################
  232.  
  233.  
  234. ##############################################################################
  235. #  Временные параметры                                                       #
  236. #----------------------------------------------------------------------------#
  237.  
  238. # Время в секундах между синхронизациями с БД учеток пользователей, 0 - ждать вечно.
  239. usersync  = 300
  240. # Number of seconds of inactivity before file is unloaded from memory.
  241. # (only checked during account file updates)
  242. userflush = 1200
  243. # Number of users checked for updates at once. Higher values make sense if you
  244. # either have very fast hardware or you don't have many number of accounts.
  245. # Lower values make sense if you have very high CPU usage on the system you run
  246. # the server (dont make it too low or your system will save accounts continously).
  247. # Modify this value ONLY if you know what you are doing!!
  248. userstep = 100
  249.  
  250. # Как часто проверять задержки канала до клиента (секунды).
  251. latency = 600
  252.  
  253. # Как часто проверять жив ли клиент (секунды).
  254. nullmsg = 120
  255.  
  256. # Amount of time to delay shutting down server in seconds.
  257. shutdown_delay = 300
  258. # Amount of time delay period is decremented by either a SIGTERM or SIGINT
  259. # (control-c) signal in seconds.
  260. shutdown_decr = 60
  261.  
  262. # Как часто проверять забаненых пользователей на предмет окончания этого самого бана (секунды).
  263. #ipban_check_int = 30
  264.  
  265. #                                                                            #
  266. ##############################################################################
  267.  
  268.  
  269. ##############################################################################
  270. # Настройки политик                                                          #
  271. #----------------------------------------------------------------------------#
  272.  
  273. # Если вы не хотите разрешать людям создавать учетки на вашем сервере, то
  274. # установите этот параметр в false.
  275. new_accounts = true
  276.  
  277. # Максимальное количество учеток, которое возможно создать на этом сервере.
  278. # По умолчанию 0, что значит - без ограничений.
  279. max_accounts = 0
  280.  
  281. # Запретит вход на сервер под одной учеткой несколько раз одновременно.
  282. kick_old_login = true
  283. #kick_old_login = false
  284. # With no passwords, this is bad to have enabled --NonReal
  285.  
  286. # Параметр load_new_account упразднен, его функционал всегда включен в PvPGN
  287.  
  288. # Если пользователь создает новый канал, то добавлять его автоматом или спросить
  289. # их начала (кого их, х/з).
  290. ask_new_channel = true
  291.  
  292. # Should a game report be written for every game played or just ladder
  293. # games?
  294. #report_all_games = false
  295. report_all_games = true
  296.  
  297. # Should Diablo I/II reports be written?  There are no winners/losers.
  298. report_diablo_games = false
  299.  
  300. # Скрывать ли запароленные игры в списке игр?
  301. hide_pass_games = true
  302.  
  303. # Скрывать ли уже запущенные игры в списке игр? (полезно для очень загруженных серверов)
  304. hide_started_games = true
  305.  
  306. # Скрывать ли не основные каналы в списке каналов?
  307. hide_temp_channels = true
  308.  
  309. # Разрешить расширенные команды /-commands? (of course!)
  310. extra_commands = true
  311.  
  312. # Считать отключение от игры за поражение?
  313. # (Turning this on will override the user's choice in ladder games!)
  314. disc_is_loss = false
  315.  
  316. # List additional game types to be counted as ladder games
  317. # Curently allowed types: topvbot, melee, ffa, oneonone
  318. # Example: ladder_games = "topvbot,oneonone"
  319. ladder_games = "topvbot,melee,ffa,oneonone"
  320.  
  321. # If additional game types are configured (see above) to be counted as ladder
  322. # games then this setting configures a game name prefix to make only games
  323. # which match this game name prefix be counted as ladder. This allows to
  324. # still have normal games of the game types configured with "ladder_games"
  325. # directive. However if this setting is commented or "" then ALL games
  326. # which match the game types configured with "ladder_games" are to be
  327. # considered as ladder games. The prefix checking is CASE SENSITIVE!
  328. # Example: ladder_prefix = "ldr_"
  329. ladder_prefix = ""
  330.  
  331. # Разрешить всем пользователям использовать команды /con и /connections?
  332. enable_conn_all = true
  333.  
  334. # Скрыть IP адрес от обычных пользователей (from /con, /games, /gameinfo, /netinfo)
  335. hide_addr = false
  336.  
  337. # Писать в файлы в chanlogdir сообщения в закрытых каналах.
  338. # (see channels.list for public channels)
  339. chanlog = false
  340.  
  341. # Использовать квоту для каналов?
  342. quota = yes
  343.  
  344. # Следующие параметры предназначены для ограничения посылаемых сообщений.
  345. #
  346. # Как много строк принимать за время quota_time (секунды)?
  347. # (The default should allow 5 lines in 5 seconds,
  348. # longer time periods allow "bursts" of traffic before the quota is full.)
  349. quota_lines = 5     # must be between 1 and 100 lines
  350. quota_time = 5      # must be between 1 and 60 seconds
  351. # "virtual wrapping", so long lines count as multiple lines
  352. quota_wrapline = 40 # must be between 1 to 256 chars
  353. # absolute maximum characters allowed in a line
  354. quota_maxline = 200 # must be between 1 to 256 chars
  355. #
  356. # How many lines do you accept in quota_time seconds before user is
  357. # disconnected?
  358. # (According to Jung-woo, Dobae is a Korean term for flooding the game server...
  359. # it originally meant "to paint the wallpaper on a new or refurbished house").
  360. # If it less than or equal to quota_lines, there is no warning before
  361. # disconnection so don't set this too low.
  362. quota_dobae = 10     # must be between 1 and 100 lines
  363.  
  364. # Mail support
  365. mail_support = true
  366. mail_quota = 5
  367.  
  368. # Channel logging message
  369. log_notice = "*** Please note this channel is logged! ***"
  370.  
  371. # Банить за превышение количества неудачных попыток входа.
  372. # Fails required to get ip banned (0 - выключить данную возможность)
  373. passfail_count = 5
  374.  
  375. # Время бана в секундах
  376. passfail_bantime = 300
  377.  
  378. # Максимальное количество пользователей в закрытом канале (0 - без ограничений)
  379. maxusers_per_channel = 0
  380.  
  381. #                                                                            #
  382. ##############################################################################
  383.  
  384.  
  385. ##############################################################################
  386. # Параметры учетных записей                                                  #
  387. #----------------------------------------------------------------------------#
  388.  
  389. # Давать имена файлам (которые хранят данные о пользователе) в виде идентификатора или имени игрока?
  390. savebyname = true
  391.  
  392. # Сохранять данные учетки при отключении
  393. sync_on_logoff = true
  394.  
  395. # How man rows should the account lookup hash table have?  Servers with
  396. # more accounts should use a larger table for better performance.
  397. hashtable_size = 61
  398.  
  399. # Per default, only alphanumerical symbols are allowed in account names
  400. # with this variable you can add some extra symbols to be allowed
  401. # but be warned - that some of them might cause trouble - at least with
  402. # savebyname=true (some symbols are forbidden in filenames or might cause
  403. # you real trouble - plz neither allow wildcard symbols like '*' or '?'.
  404. # Path delimiters like '/' or '\' are hardcoded filtered and can't be allowed.
  405. # Also note that allowing the '.' might cause u some headache on win32 systems.
  406. # You have been warned - the rest is up to you.
  407. # default setting is "-_[]" as it was previous versions
  408. account_allowed_symbols = "-_[]"
  409.  
  410. # This setting affects users that login with their uid rather than their
  411. # username. If set to true their displayed username will be forcefully
  412. # converted to their registered account name.
  413. account_force_username = false
  414.  
  415. # Максимальное количество пльзователей  в списке друзей.
  416. # default setting is 20
  417. max_friends = 20
  418.  
  419. #                                                                            #
  420. ##############################################################################
  421.  
  422.  
  423. ##############################################################################
  424. # Tracking server info                                                       #
  425. #----------------------------------------------------------------------------#
  426.  
  427. # Set track=0 to disable tracking.  Any other number will set number
  428. # of seconds between sending tracking packets. This is OFF by default.
  429. #track = 0
  430. track = 60
  431. # 10 minutes
  432.  
  433. # Tracking server(s)
  434. # Use a comma delimited list of hostnames with optional UDP port numbers
  435. # after colons. (port 6114 is the default for the newer tracking protocol)
  436. #trackaddrs = "track.bnetd.org,localhost:9999"
  437. #trackaddrs = "track.pvpgn.org"
  438.  
  439. # Change these to match your system, for example:
  440. location = "Russia"
  441. description = "Rock"
  442. url = "http://www.info-x.org"
  443. contact_name = "Nekit"
  444. contact_email = "admin@info-x.org"
  445.  
  446. #                                                                            #
  447. ##############################################################################
  448.  
  449.  
  450. ##############################################################################
  451. # Server network info                                                        #
  452. #----------------------------------------------------------------------------#
  453.  
  454. # Имя сервера (По умолчанию: "PvPGN Realm")
  455. #servername = "PvPGN Realm"
  456.  
  457. # Максимальное количество подключений к серверу (минимум 32).
  458. max_connections = 100
  459.  
  460. # Максимальное количество одновременных попыток войти на сервер (0 - без ограничений).
  461. max_concurrent_logins = 0
  462.  
  463. # Разрешить TCP посылать keepalive.
  464. use_keepalive = true
  465.  
  466. # Максимальное количество подключений с одного IP (0 - без ограничений)
  467. max_conns_per_IP = 0
  468.  
  469. # This is a comma delimited list of hostnames that the server should
  470. # listen on.  It might be useful to make an internal-only server on a
  471. # gateway machine for example.  If the list is not set or if it has a
  472. # entry with no host component, the server will bind to that port on all
  473. # interfaces.
  474. #servaddrs = ":9999"
  475. #servaddrs = "myinternalname.some.com,localhost"
  476. servaddrs = ":" # default interface (all) and default port (6112)
  477.  
  478. # Don't change these unless you really need to!  You will need to run a proxy
  479. # or modify the clients.  Also note that these will not change when simply
  480. # sending a HUP signal to the server; they are only read on startup.
  481.  
  482. # This is the port the server send the UDP test packets to by default.
  483. # Setting it to zero makes the server use the same port as the TCP connection
  484. # comes from. Newer clients can override this setting on a per connection
  485. # basis.
  486. #udptest_port = 6112
  487.  
  488.  
  489. # W3 Play Game router address. Just put your server address in here
  490. # or use 0.0.0.0:6200 for server to bind to all interfaces,
  491. # but make sure you set up w3trans if you do.
  492. w3routeaddr = "0.0.0.0:6200"
  493.  
  494. # w3routeshow has been removed.
  495. # see the address_translation.conf for translating the w3route ip for local networks
  496.  
  497. # initkill_timer sets up a periodic timer on init/defer class connections
  498. # this should detect and clean up stale connections to your server
  499. initkill_timer = 120
  500.  
  501. #                                                                            #
  502. ##############################################################################
  503.  
  504. ##############################################################################
  505. # Westwood Online (WOL) configuration                                        #
  506. #----------------------------------------------------------------------------#
  507.  
  508. # NOTE: WOL support is still experimental!
  509.  
  510. # This specifies the addresses where IRC connections should be accepted. See
  511. # the description of servaddrs for formatting information. Leave this field
  512. # blank if you do not want to accept IRC connections.  If the port is not
  513. # specifed then 4005 will be used. Note: DO NOT SET THE PORT TO ANYTHING OTHER
  514. # THEN 4005, WOL WILL FAIL IF YOU DO!
  515. #woladdrs = ":4005"
  516.  
  517. # Just leave these as default (unless you know the timezone, longitiude and latitude
  518. # of your server
  519. woltimezone = "-8"
  520. wollongitude = "36.1083"
  521. wollatitude = "-115.0582"
  522.  
  523. #                                                                            #
  524. ##############################################################################
  525.  
  526. ##############################################################################
  527. # Настройки IRC                                                              #
  528. #----------------------------------------------------------------------------#
  529.  
  530. # Учтите: поддержка IRC находится на стадии тестирования!
  531.  
  532. # This specifies the addresses where IRC connections should be accepted. See
  533. # the description of servaddrs for formatting information. Leave this field
  534. # blank if you do not want to accept IRC connections.  If the port is not
  535. # specified then 6667 will be used.
  536. #ircaddrs = ":6667"
  537.  
  538. # This is the IRC network name. If this is not specified then the default of
  539. # "PvPGN" will be used.
  540. #irc_network_name = "PvPGN"
  541.  
  542. # This is the hostname used for IRC connections. Set this to your
  543. # hostname, if the automatic detection doesn't correctly.
  544. #hostname = "none"
  545.  
  546. # Set this to the desired IRC connection timeout in seconds.
  547. #irc_latency = 180
  548.  
  549. #                                                                            #
  550. ##############################################################################
  551.  
  552.  
  553. ##############################################################################
  554. # Настройки Telnet                                                           #
  555. #----------------------------------------------------------------------------#
  556.  
  557. # This specifies the addresses where telnet connections should be accepted.
  558. # See the description of servaddrs for formatting information. Leave this
  559. # field # blank if you do not want to accept telnet connections.  If the port
  560. # is not specifed then 23 will be used.
  561. #telnetaddrs = ":23"
  562. telnetaddrs = ""
  563.  
  564. ###############################################################################
  565. # war3 ladder textual output                                                  #
  566. #-----------------------------------------------------------------------------#
  567. # this is for all the guys, that want Warcraft 3 ladder, but don't want their
  568. # server to run with MySQL support.
  569. # For each ladder (solo, team, ffa, at) a corresponing file is created,
  570. # so it's easy to build your ladder pages with them
  571.  
  572. # the following value determines, at which rate, these files are created
  573. # set to 0 if you don't want or need these files
  574. war3_ladder_update_secs = 300
  575.  
  576. # jfro's latest ladder is based on XML... so we can switch to XML output of ladder
  577. # on demand
  578. XML_output_ladder = false
  579.  
  580. ###############################################################################
  581. # server status textual output                                           #
  582. #-----------------------------------------------------------------------------#
  583. # This is for writing status of the server in an attempt to see number of user
  584. # on line actually, and games/chans.
  585. # This is store in file var\status\warcraft3.dat as a *.ini format.
  586. # Shouldn't be so hard in php to create dynamic website using this content.
  587.  
  588. # the following value determines, at which rate, these files are created
  589. # set to 0 if you don't want or need these files
  590. output_update_secs = 60
  591.  
  592. # jfro's latest ladder is based on XML... so we can switch to XML output of ladder
  593. # on demand. Maybe we should set update interval bigger cause XML output version
  594. # is much more verbose than the standard output
  595. XML_status_output = false
  596.  
  597. ###############################################################################
  598. # Параметры кланов                                                            #
  599. #-----------------------------------------------------------------------------#
  600.  
  601. # Time in hours for a new member of clan to be a newer(Peon icon, cannot promote to Grunt)
  602. # default value 168(7 days). If set to 0, all new members could be promote in no time
  603. clan_newer_time = 0
  604.  
  605. # max members count allowed in a clan, set between 10 and 100, default 50.
  606. clan_max_members = 50
  607.  
  608. # Default clan channel status when create a clan, 1 for private, 0 for public
  609. clan_channel_default_private = 0
После настройки помещаем демон bnetd в автозагрузку и запускаем его:
  1. # echo 'bnetd_enable="YES" >> /etc/rc.conf'
  2. # service bnetd start
Проверяем - запустился ли сервис:
  1. # sockstat -4 -l | grep bnet
  2. bnetd    bnetd      15105 4  tcp4   *:6112                *:*
  3. bnetd    bnetd      15105 5  udp4   *:6112                *:*
  4. bnetd    bnetd      15105 6  tcp4   *:6200                *:*
На данном этапе настройка сервера PvPGN завершена. Осталось на стороне клиентов прописать адрес данного Battle.net сервера. Для этого есть специальные программы, которые облегчают данный процесс. Парочку таких я прикрипил к статье. Теперь о проблемах, которые возникли в процессе эксплуатации данного сервера. Starcraft подключается к серверу без каких-либо дополнительных приложений, но возникает проблема, когда игроки WAN и LAN пытаются играть вместе. Starcraft жутко начинает лагать. Описание и решение данной проблемы можно найти по ссылке, которую я указал в полезных ссылках. С Warcraft 3 немного веселее - для того, чтобы он работал с данным сервером необходим загрузчик, который я так же прикрепил к статье. Он подходит для версий игры 1.22 и выше, я проверял его на версии 1.26. Пару слов про создание первого администратора в PvPGN: после создания учетной записи на сервере, нужно подключиться к базе данных и в таблице pvpgn_bnet у нужного пользователя в колонке auth_admin установить значение в true.
Прикрепленные файлы

Добавить комментарий

Этот вопрос задается для того, чтобы выяснить, являетесь ли Вы человеком или представляете из себя автоматическую спам-рассылку.