Compare commits

...

690 commits

Author SHA1 Message Date
relesgoe
fcdf00fedf Revert previous commit 2021-02-26 23:28:46 -08:00
relesgoe
7491f568e8 Update README.md 2021-02-27 07:24:48 +00:00
RElesgoe
d05a714e39
Remove Clang 2020-10-16 16:18:27 -07:00
RElesgoe
c4b62e3731
Create codeql-analysis.yml 2020-10-01 05:18:58 -07:00
RElesgoe
0f37dd2347
Let Clang use default standard library 2020-09-22 12:04:03 -07:00
RElesgoe
4437f3bf65
Add -Wno-idiomatic-parentheses flag for Clang 2020-09-19 01:35:35 -07:00
RElesgoe
3f83bd0044
Remote -O3, -march, and , -mtune flags for Clang and GCC 2020-09-19 01:34:15 -07:00
RElesgoe
42bf0f1587
Build with both clang and gcc 2020-09-19 01:16:14 -07:00
RElesgoe
7a3f413ec4
Change distribution to focal 2020-09-19 01:15:18 -07:00
RElesgoe
77c2b4e307
Update CMakeLists.txt 2020-06-05 01:54:44 -07:00
RElesgoe
8ea40616d1
Revert FindMySQL.cmake to old version 2020-06-05 00:02:26 -07:00
RElesgoe
fdb359250e
Update CMakeLists.txt 2020-06-04 16:56:54 -07:00
RElesgoe
aa81c94b41
Update CMakeLists.txt 2020-06-04 16:03:55 -07:00
RElesgoe
ab22f8da62
Update CMakeLists.txt 2020-06-04 16:03:25 -07:00
RElesgoe
eb32a735b1
Merge branch 'develop' into master 2020-05-17 22:37:11 -07:00
relesgoe
1136333b0d Comment pre-existing alias commands. bnalias.conf will have no aliases by default. 2020-05-17 22:13:51 -07:00
relesgoe
14c5c0fdeb Try to read account's charinfo directory after creating it when the directory was initially nonexistant 2020-05-17 22:13:51 -07:00
relesgoe
dba5e6db69 Revert Winapi wide changes 2020-05-17 22:13:51 -07:00
RElesgoe
79b2ab6b5e
Update appveyor.yml 2020-05-17 17:26:00 -07:00
RElesgoe
ca51708af6
Merge pull request #398 from denodster/master
#397 Add PMAC versioncheck entries for WC2 2.02, SC: BW (SC mode) 1.15.0, SC: BW (BW mode) 1.15.0, D1 1.08, and D1 1.09
2020-04-07 02:32:36 -07:00
HarpyWar
040ff6a173
Update appveyor.yml 2020-04-06 13:19:22 +03:00
Andrew Colchagoff
f6150041d7 Fixes #397 As well as add support for Other PMac Versions 2020-04-04 00:09:23 -04:00
RElesgoe
7c78536025
Update appveyor.yml 2020-01-08 02:07:36 -08:00
RElesgoe
42ad0865d7
Update appveyor.yml 2020-01-07 17:58:40 -08:00
RElesgoe
7e05344e58
Compile to 64-bit binaries 2020-01-07 17:02:54 -08:00
RElesgoe
f06269330f
Update FindMySQL.cmake 2020-01-07 16:26:50 -08:00
RElesgoe
82ba84aee9
Update CMakeLists.txt 2020-01-07 02:47:04 -08:00
RElesgoe
32d67055d3
Update FindMySQL.cmake 2020-01-07 01:38:16 -08:00
RElesgoe
cc371941aa
Update CMakeLists.txt 2020-01-06 23:47:12 -08:00
RElesgoe
98621a361a
Use environment variable ProgramW6432 when searching for MySQL files/paths
This will force a 32-bit CMake binary on a 64-bit host to look in the C:/Program Files/ directory instead of the C:/Program Files (x86)/ directory.
2020-01-06 23:30:08 -08:00
RElesgoe
5092fe07ae
Use FindMySQL.cmake from github.com/facebook/hhvm 2020-01-06 21:01:20 -08:00
RElesgoe
1f746909c1
Update appveyor.yml 2020-01-06 20:18:14 -08:00
RElesgoe
2876017b7d
Update appveyor.yml 2020-01-06 20:06:16 -08:00
RElesgoe
305ccfb2b8
Temporarily delete build cache 2020-01-06 19:53:04 -08:00
cen1
d4a4c2d39c
Merge pull request #394 from BNETDocs/develop
Change bnftp to exit success when successful
2020-01-04 02:53:21 +01:00
Carl Bennett
5188f4e555 Change bnftp to exit success when successful 2020-01-03 11:22:02 -06:00
RElesgoe
1af4a3ebbc
Update appveyor.yml 2019-12-18 01:32:49 -08:00
RElesgoe
043dd8a799
Update appveyor.yml 2019-12-18 00:35:07 -08:00
RElesgoe
0e2e05b69c
Update appveyor.yml 2019-12-18 00:22:47 -08:00
RElesgoe
9182a891c9
Update appveyor.yml 2019-12-16 15:47:30 -08:00
RElesgoe
3c3425438d
Update appveyor.yml
Remove testing code, rewrote artifact packaging scripts
2019-12-16 15:07:30 -08:00
RElesgoe
9724f3fe49
Fix renaming binaries 2019-12-16 14:02:48 -08:00
RElesgoe
e28f44e5ec
Pass -A Win32 to CMake calls 2019-12-16 11:33:52 -08:00
RElesgoe
5c8a50ecd3
Change platform from x86 to Win32 2019-12-16 10:56:39 -08:00
RElesgoe
7fedbaf588
Remove hard-coded lua5.1.lib linker include 2019-12-16 10:17:06 -08:00
relesgoe
04ce9f62f9 Fixed path to projectory directory 2019-12-15 22:27:04 -08:00
relesgoe
88a7219ea9 Update .travis.yml to use Ubuntu Bionic, remove redundant packages 2019-12-15 22:00:56 -08:00
relesgoe
b9bfc08e9b Change AboutDlgProc() and KickDlgProc() declarations to match the corresponding function signatures in WinAPI documentation 2019-12-15 21:03:42 -08:00
relesgoe
45f5cb0c28 Change guiWndProc() and AnnDlgProc() declarations to match the corresponding function signatures in WinAPI documentation 2019-12-15 20:41:28 -08:00
relesgoe
3f18c75cb5 Invoke CMake with CMAKE_SYSTEM_VERSION = 10.0 in AppVeyor 2019-12-15 19:56:31 -08:00
relesgoe
d124142bc1 Continuation of previous commit 2019-12-15 18:19:36 -08:00
relesgoe
ce4cf6d2ff Change image from Visual Studio 2017 to Visual Studio 2019 2019-12-15 18:18:55 -08:00
relesgoe
4f9f84ff43 Don't pull vcpkg's upstream anymore 2019-12-15 18:05:22 -08:00
relesgoe
241e038eb2 Set LUA_DIR environment variable in AppVeyor 2019-12-15 17:54:57 -08:00
relesgoe
1b6278f053 Removed local FindLua.cmake, CMake will now use its built-in FindLua.cmake 2019-12-15 17:54:43 -08:00
relesgoe
852cf02143 Install lua from Chocolatey instead of vcpkg 2019-12-15 17:10:20 -08:00
cen1
9374dd3b00
Merge pull request #385 from pvpgn/feature/docs
Feature/docs
2019-07-11 23:31:06 +02:00
cen1
89616448fa add ubuntu 18.04 and clarify debian compiler 2019-07-11 23:26:05 +02:00
cen1
d874f59d85 add route info to readme 2019-04-23 04:12:02 +03:00
cen1
7f6caa7ac0 add route info to readme 2019-03-07 00:08:46 +01:00
HarpyWar
91fb4ee395 add track.pvpgn.pro to trackaddrs 2019-01-16 17:06:39 +03:00
RElesgoe
697e62b8fb Fixed error 2018-08-15 00:36:59 -07:00
RElesgoe
3f0bd8b978 Fixed error 2018-08-15 00:11:49 -07:00
RElesgoe
92787f2c30 Fix error 2018-08-14 23:07:45 -07:00
RElesgoe
7ba9dfd2f4 Install libmariadb instead of libmysql 2018-08-14 22:55:54 -07:00
RElesgoe
57b93c6939 Update vcpkg through git 2018-08-14 14:45:33 -07:00
RElesgoe
26a783518d Add vcpkg packages to cache 2018-08-10 18:16:03 -07:00
RElesgoe
a9f7fea510 Add vcpkg update before installing packages 2018-08-10 18:14:32 -07:00
RElesgoe
cdb41e277c Fixed error 2018-08-10 17:08:39 -07:00
RElesgoe
8ec8122cd9 Fixed typo 2018-08-10 17:05:36 -07:00
RElesgoe
a83510fb39 Install PDB files only when using Visual Studio and Windows 2018-08-10 16:48:04 -07:00
RElesgoe
ae3bac9337 Fixed syntax error 2018-08-10 16:41:36 -07:00
RElesgoe
ce38172b72 Update AppVeyor to configure and build PvPGN with CMake and MSBuild directly 2018-08-10 16:33:20 -07:00
RElesgoe
06f967c19d Install PDB files along with their binaries for bnetd, d2cs, and d2dbs 2018-08-10 16:13:13 -07:00
RElesgoe
44ae82c91c Remove dependency on afxres.h when compiling without gui 2018-08-01 11:01:16 -07:00
RElesgoe
a633c1e8f0 Revert "Re-add FindZLIB.cmake"
This reverts commit 5225b5ae9d.
2018-08-01 10:49:32 -07:00
RElesgoe
5225b5ae9d Re-add FindZLIB.cmake 2018-08-01 10:32:03 -07:00
RElesgoe
b684ef9cff Revert "Changed binary names from bnetd to PvPGN/PvPGNConsole, d2cs to D2CS/D2CSConsole, and d2dbs to D2DBS/D2DBSConsole"
This reverts commit 51607568ac.
2018-07-29 06:13:43 -07:00
RElesgoe
51607568ac Changed binary names from bnetd to PvPGN/PvPGNConsole, d2cs to D2CS/D2CSConsole, and d2dbs to D2DBS/D2DBSConsole 2018-07-29 03:54:42 -07:00
RElesgoe
9378a8dfe6 Fixed include placement 2018-07-28 19:05:19 -07:00
RElesgoe
6ca46aca62 Re-added make command to Travis config file 2018-07-28 18:49:09 -07:00
RElesgoe
e1ff375b4d Add additional includes 2018-07-28 18:40:08 -07:00
RElesgoe
672e81e8de Fixed file existence check in CMake 2018-07-28 18:15:47 -07:00
RElesgoe
ae25d2d731 Improve CMake files 2018-07-27 06:53:26 -07:00
RElesgoe
1226f0f21c Remove code related to HAVE_CONFIG_H 2018-07-27 04:44:37 -07:00
RElesgoe
4a4208a15f Remove unused code 2018-07-27 04:43:12 -07:00
RElesgoe
0c6402841f Fix compilation 2018-07-27 04:40:16 -07:00
RElesgoe
0a20cf448a Replace subdirs() with multiple add_subdirectory() calls 2018-07-27 03:19:17 -07:00
RElesgoe
a9b2a48ada Specify C++ standard requirement in CMake 2018-07-27 02:52:41 -07:00
RElesgoe
29b5f2f886 Remove unnecessary ppa in Travis config 2018-07-27 02:43:58 -07:00
RElesgoe
d1d98760d6 Build commits from develop branch in Travis 2018-07-27 02:32:20 -07:00
RElesgoe
9ebaef6911 Remove Coverity Scan from Travis config 2018-07-27 02:31:47 -07:00
RElesgoe
e4e8579a60 Merge branch 'develop' of https://github.com/pvpgn/pvpgn-server into develop 2018-07-20 22:45:31 -07:00
RElesgoe
e16e1851b2 Upgrade fmt from 3.0.1 to 5.1.0 2018-07-20 22:28:24 -07:00
RElesgoe
beeb0c3469 Remove unnecessary length check 2018-07-15 02:39:39 -07:00
RElesgoe
523a87c81d Remove unnecessary length check 2018-07-15 02:38:11 -07:00
RElesgoe
d7e0392c96 Change type of i from unsigned int to std::size_t 2018-07-15 02:31:15 -07:00
RElesgoe
3284ab32a8 Change type of len from unsigned int to std:size_t 2018-07-15 02:27:32 -07:00
RElesgoe
e4df12bd13 Remove unnecessary c_str() call 2018-07-15 02:21:40 -07:00
RElesgoe
c9be8ce1fb Conditionally check result when WITH_LUA is defined 2018-07-15 02:11:43 -07:00
RElesgoe
d2708b5792 Revert "Conditionally check result when WITH_LUA is defined"
This reverts commit 2b22068c48.
2018-07-15 02:10:06 -07:00
RElesgoe
2b22068c48 Conditionally check result when WITH_LUA is defined 2018-07-15 02:09:32 -07:00
RElesgoe
9e7c471e0f
Merge pull request #362 from pvpgn/develop
Finalize 1.99.7.2.1 release
2018-07-09 22:38:58 -07:00
RElesgoe
2b503e035e
Merge branch 'master' into develop 2018-07-09 16:08:14 -07:00
RElesgoe
6698e036cf Add StarCraft and StarCraft: Brood War 1.18.0 versioncheck entry 2018-07-09 14:36:28 -07:00
RElesgoe
9a1a830347 Update PvPGN verion to 1.99.7.2.1 2018-07-09 14:33:59 -07:00
RElesgoe
e5d0aab7b9 Update downloads badge in readme 2018-07-09 14:33:20 -07:00
RElesgoe
ddc84e873a Create versioncheck entries for StarCraft and StarCraft: Brood War 1.18.0 2018-06-26 02:43:55 -07:00
RElesgoe
9aa884eaa4 Modernized timing in accountlist_load_all() 2018-06-12 16:14:17 -07:00
RElesgoe
6ab1b48c28 Removed eventlog calls from conn_set_archtag() and conn_set_clienttag() 2018-05-31 00:40:24 -07:00
RElesgoe
7a1816ba1d Renamed COUNTRYINFO_109 packet to AUTH_INFO 2018-05-31 00:37:01 -07:00
RElesgoe
df837c6f3e Fixed memory leak in ipbanlist_check() when returning without freeing whole 2018-05-28 15:27:10 -07:00
RElesgoe
08b42c5990 Fixed memory leak in game_report() when returning without freeing ladder_info 2018-05-28 15:11:54 -07:00
RElesgoe
682abe3cc5 Update icon and supported StarCraft versions in README.md 2018-05-28 15:02:05 -07:00
RElesgoe
8464f2b4dd Fixed /games command to hide private games when hide_pass_games is true. Admins can now view private games via /games all even when hide_pass_games is true. 2018-05-17 23:18:56 -07:00
RElesgoe
1212e047e2 Added ad000002.smk to installation 2018-05-17 22:27:51 -07:00
RElesgoe
2bb5613ce7 Fixed typo 2018-05-17 17:41:01 -07:00
RElesgoe
c29b950a82 Added versioncheck entries for StarCraft 1.17.0 and StarCraft: Brood War 1.17.0 2018-05-17 17:20:24 -07:00
RElesgoe
69b4b7ebbe - Added additional logging
- Fixed bug that prevented clients using an older login system from connecting
2018-05-17 17:06:49 -07:00
RElesgoe
64386a81b7 Merge branch 'develop' of https://github.com/pvpgn/pvpgn-server into develop 2018-05-16 19:26:25 -07:00
RElesgoe
09caba4858 Remove deprecated options from bnetd.conf for Windows 2018-05-16 19:23:57 -07:00
RElesgoe
488f06791c Fixed memory leak in _client_authreq109() when returning without calling packet_del_ref() 2018-05-16 13:15:21 -07:00
RElesgoe
222f4cd465 Fixed memory leak in _client_passchangeproofreq() when returning without calling packet_del_ref() 2018-05-16 13:13:55 -07:00
RElesgoe
4d87132872 Fixed memory leak when _client_logonproofreq() returns without calling packet_del_ref() 2018-05-16 13:11:35 -07:00
HarpyWar
36f9925357 set compiler and linker flags only for msvc 2018-05-09 11:16:34 +03:00
HarpyWar
f7ba9ec0a6 fix artifact file name 2018-05-09 11:16:34 +03:00
HarpyWar
4235aa8b3a * fix cmake linker flags
* update appveyor with disable debug build and add separate archive with pdb for release
2018-05-09 11:16:34 +03:00
HarpyWar
0d1c09e918 add pdb generation for d2cs and d2dbs 2018-05-09 11:16:34 +03:00
HarpyWar
90fa311a18 * Add debug information for crash dumps. /Zi flag was missing and dumps did not contain useful info for debugging in non-assembler mode.
* Generate dump for Release by default
2018-05-09 11:16:34 +03:00
HarpyWar
33a70d17ce Move crash dump generation into a separate file winmain.cpp 2018-05-09 11:16:34 +03:00
HarpyWar
70c654989e set compiler and linker flags only for msvc 2018-05-09 01:01:46 +03:00
HarpyWar
9796253960 fix artifact file name 2018-05-08 22:25:44 +03:00
HarpyWar
c1c0c7789c * fix cmake linker flags
* update appveyor with disable debug build and add separate archive with pdb for release
2018-05-08 20:51:28 +03:00
HarpyWar
b186b23a30 add pdb generation for d2cs and d2dbs 2018-05-08 01:03:24 +03:00
HarpyWar
4d1025dd9d * Add debug information for crash dumps. /Zi flag was missing and dumps did not contain useful info for debugging in non-assembler mode.
* Generate dump for Release by default
2018-05-07 23:59:36 +03:00
HarpyWar
2e2232c4c1 Move crash dump generation into a separate file winmain.cpp 2018-05-07 23:53:36 +03:00
RElesgoe
007dc8a332
Merge pull request #347 from pvpgn/develop
Finalize 1.99.7.2.0 release
2018-05-06 15:07:44 -07:00
RElesgoe
b53e0b13c8
Add Coverity Scan to Travis CI 2018-05-06 12:42:31 -07:00
RElesgoe
7d0b2e7ab3 Merge branch 'develop' of https://github.com/pvpgn/pvpgn-server into develop 2018-05-05 23:24:06 -07:00
RElesgoe
6c2b35ce6c Pass const char pointer instead of char to packet_append_string() in _client_authreq109() 2018-05-05 23:23:58 -07:00
RElesgoe
966751b26a Fix crash when a client connects with no corresponding versioncheck entry and allow_unknown_version is true 2018-05-05 23:22:42 -07:00
RElesgoe
0695ed0716
Merge branch 'master' into develop 2018-05-03 01:53:39 -07:00
RElesgoe
1de80bfdae Change version number from 1.99.7.1.1 to 1.99.7.2.0 2018-05-03 01:46:29 -07:00
RElesgoe
ee9d84478d Revert accidental change 2018-05-03 01:45:58 -07:00
RElesgoe
0923f6a52e Remove cdb support 2018-04-28 20:58:14 -07:00
RElesgoe
5699020a6b Remove /src/autoconf directory 2018-04-28 18:46:08 -07:00
RElesgoe
74b06d022b
Overhaul versioncheck system (#340)
* Overhaul versioncheck system
 - Removed version_exeinfo_match, skip_versioncheck, and version_exeinfo_maxdiff from bnetd.conf
 - Modified configuration file to use JSON
 - Correctly finds the appropriate versioncheck entries
 - Add versioncheck.md to docs/

* Update JSON for Modern C++ from 3.0.1 to 3.1.2
2018-04-28 17:23:10 -07:00
RElesgoe
47ba463536 Add versioncheck.md to docs/ 2018-04-26 01:37:02 -07:00
RElesgoe
5cc3771b5b Change vc_entries to use std::unordered_map instead of std::forward_list 2018-04-26 00:56:54 -07:00
RElesgoe
e5ec51628a Remove VERSIONCHECK_INTERNAL_ACCESS macro 2018-04-24 22:24:43 -07:00
RElesgoe
05d00d134f Clear cr_entries on unload 2018-04-24 22:20:34 -07:00
RElesgoe
2c10c89964 Fix multi-character constant warning 2018-04-23 14:11:24 -07:00
RElesgoe
4e7163f444 Reordered code 2018-04-23 14:00:48 -07:00
RElesgoe
bc0590fa75 Use uniform initialization instead of initializer list 2018-04-23 13:03:52 -07:00
RElesgoe
497e7a9157 - Removed version_exeinfo_match and skip_versioncheck from bnetd.conf
- Removed remaining references to version_exeinfo_maxdiff
- Modified versioncheck.json format
- Correctly finds the appropriate versioncheck entries
2018-04-22 23:14:25 -07:00
RElesgoe
f8dd2b8b8b Update JSON for Modern C++ from 3.0.1 to 3.1.2 2018-04-08 16:49:20 -07:00
HarpyWar
9c326d33ce
Forbid reading of BNET\acct\verifier with /set
https://github.com/pvpgn/pvpgn-server/issues/333
2018-03-28 10:19:04 +03:00
HarpyWar
85f26eb2ab
Update appveyor.yml 2018-03-02 10:02:52 +03:00
HarpyWar
b5e55b4a30
Update appveyour.yml
https://github.com/pvpgn/pvpgn-server/issues/337
2018-02-11 09:58:06 +03:00
RElesgoe
05ae34eff1 I don't know how this happened 2018-02-10 21:17:16 -08:00
RElesgoe
10b63de30e Fix build 2018-02-10 21:12:01 -08:00
RElesgoe
b75ac5e39e Overhaul versioncheck system 2018-02-10 03:01:12 -08:00
RElesgoe
a78355e88a Replace use of deprecated function that serializes a stream to a json object 2018-01-04 02:40:10 -08:00
RElesgoe
c2ee0a33e3 Update JSON for Modern C++ from 2.0.2 to 3.0.1 2018-01-04 02:25:28 -08:00
RElesgoe
94fb6842ee Update .gitignore 2018-01-04 02:24:54 -08:00
RElesgoe
a4afc108ad
Re-add UNICODE and _UNICODE defines for MSVC 2017-12-17 01:15:57 -08:00
RElesgoe
abe0cf8f2c
Added -O3 -march=native -mtune=native flags for G++ and Clang 2017-12-14 19:49:16 -08:00
RElesgoe
7f90cc251b
Fix compiler detection and flag passing 2017-12-14 19:41:22 -08:00
cen1
dc3d64e668 fixes issue 314 2017-09-05 23:56:11 +02:00
RElesgoe
517bc3a5e6 Delete IGNOREME 2017-08-07 22:26:46 -07:00
RElesgoe
c142e0063a Updated supported clients in readme 2017-08-07 22:26:10 -07:00
RElesgoe
39a391cded Rename COPYING to LICENSE 2017-08-07 22:19:27 -07:00
RElesgoe
4c6f55d98d List supported clients in readme 2017-08-07 22:13:24 -07:00
RElesgoe
d232c3117f Merge pull request #318 from cen1/128updates
WarCraft 3 1.28.2, 1.28.4, 1.28.5 Versioncheck
2017-08-07 21:45:38 -07:00
cen1
3a09bec191 1.28 versioncheck series 2017-07-16 12:33:50 +02:00
HarpyWar
2f60147fff fix banners 3edbffb955 (commitcomment-23104980) 2017-07-15 11:54:37 +03:00
HarpyWar
408c3ce907 fix mistake 2017-07-14 20:30:24 +03:00
HarpyWar
3edbffb955 Fixes for banners:
* fix randomize banners
* fix miss handling of first banner https://github.com/pvpgn/pvpgn-server/issues/300
* change banners iteration from random to sequence if client support it (actually only warcraft 3 does not support it)
* fix ad000001.smk to show in diablo 2
* return ad000002.smk from old pvpgn for a change
2017-07-14 17:42:32 +03:00
HarpyWar
95ab5faccf fix 1454cdd256 2017-07-04 16:06:08 +03:00
RElesgoe
8b333d0fd9 Check for null friends list before attempting to unload an account's friend list 2017-05-28 17:16:30 -07:00
RElesgoe
9e0a01455d - Fix pre-filled username input in Windows GUI
- Fix sending server announcements from Windows GUI
2017-05-28 17:04:33 -07:00
HarpyWar
dcd4ffb509 forgot that first variable always corresponds to icon_key 2017-05-25 18:53:15 +03:00
HarpyWar
77ea946864 * fix icons.conf variables for compatibility with a plain mode https://forums.pvpgn.pro/viewtopic.php?pid=8988#p8988
* add predefined examples for Warcraft 2 and Diablo 1
* update link to Bni Icon Builder
2017-05-25 17:55:04 +03:00
HarpyWar
5c59124205 fix mistake from the previous commit 2017-05-24 23:04:25 +03:00
HarpyWar
f37309e2a8 add missing diablo 2 gametypes for open battle.net https://github.com/pvpgn/pvpgn-server/issues/307
https://forums.pvpgn.pro/viewtopic.php?pid=8981#p8981
2017-05-24 23:01:21 +03:00
HarpyWar
1454cdd256 switch log line from error to debug https://github.com/pvpgn/pvpgn-server/issues/307 2017-05-24 22:42:22 +03:00
HarpyWar
5608370ad9 (bug fix) make sqlite3 working again https://github.com/pvpgn/pvpgn-server/issues/311 2017-05-23 19:59:04 +03:00
HarpyWar
601798c108 (bug fix) symbol ` is unacceptable in syntax of pgsql and odbc https://github.com/pvpgn/pvpgn-server/issues/311 2017-05-23 19:51:25 +03:00
HarpyWar
77570d08c0 (bug fix) increase sizes of database columns https://github.com/pvpgn/pvpgn-server/issues/301 2017-05-23 19:45:01 +03:00
HarpyWar
a0b67d1328 Update appveyor.yml
https://github.com/pvpgn/pvpgn-server/issues/308
2017-05-22 22:44:26 +03:00
HarpyWar
5b033ffac2 Update appveyor.yml
https://github.com/pvpgn/pvpgn-server/issues/308
2017-05-22 22:26:01 +03:00
HarpyWar
9ae0fceac2 Update appveyor.yml
https://github.com/pvpgn/pvpgn-server/issues/308
2017-05-22 21:37:10 +03:00
HarpyWar
c1529fc6a0 Update appveyor.yml
https://github.com/pvpgn/pvpgn-server/issues/308
2017-05-22 20:27:19 +03:00
HarpyWar
7c6be2ee50 Update appveyor.yml
https://github.com/pvpgn/pvpgn-server/issues/308
2017-05-22 20:08:16 +03:00
HarpyWar
b331c9f1c9 Update appveyor.yml 2017-05-22 19:42:24 +03:00
HarpyWar
71f1d2ced8 Update appveyor.yml
https://github.com/pvpgn/pvpgn-server/issues/308
2017-05-22 19:06:40 +03:00
HarpyWar
c057e4b9e1 Update appveyor.yml
https://github.com/pvpgn/pvpgn-server/issues/308
2017-05-22 19:06:09 +03:00
HarpyWar
7a5741dbdf Update appveyor.yml
testing build matrix https://github.com/pvpgn/pvpgn-server/issues/308
2017-05-22 19:04:14 +03:00
RElesgoe
d5b7a51c99 Merge pull request #304 from cen1/versioncheckw31281
Versioncheck WarCraft 3 1.28, 1.28.1, 1.28.2
2017-05-20 16:24:27 -07:00
cen1
ccad33bfdb support for w3 1.28.2 2017-05-20 15:38:37 +01:00
cen1
424ab7c97d fix entry ordering 2017-05-20 12:04:11 +01:00
cen1
1824ce6dd2 versioncheck for w3 1.28.1, works with w3l 1.28 with no changes 2017-04-28 21:31:57 +01:00
cen1
0ae55c11c2 versioncheck for w3 1.28 2017-04-22 12:27:18 +01:00
HarpyWar
9ee4009660 Update appveyor.yml
Remove plain build to fit in 1 hour of available time in appveyor
2017-04-03 21:20:06 +03:00
cen1
8da1718e0b zlib names typo 2017-03-30 20:28:13 +03:00
cen1
d5ea411b9a fix magic builder link 2017-03-30 20:27:02 +03:00
HarpyWar
b5771e760d Update appveyor.yml 2017-03-30 14:34:24 +03:00
HarpyWar
9b621b4d11 Update appveyor.yml 2017-03-30 11:45:27 +03:00
HarpyWar
2bbeabaeba Update appveyor.yml
set build image "Visual Studio 2017" https://www.appveyor.com/docs/build-environment/
2017-03-30 09:23:16 +03:00
RElesgoe
69da5ab2bf Change version from 1.99.7.1-PRO to 1.99.7.1.1-PRO 2017-03-21 03:21:29 -07:00
RElesgoe
3b46205114 - Improved code safety
- Fixed bug in /ipscan command
- Restored icons_STAR.bni
2017-03-21 03:20:06 -07:00
RElesgoe
38c78a5a1c Fix handling of WC3 MOTD file 2017-03-21 01:42:15 -07:00
RElesgoe
9606689639 Use correct case of ver-IX86-1.mpq in versioncheck.conf 2017-03-21 00:09:25 -07:00
RElesgoe
a1a4d483c9 Ignore /.vs folder in git 2017-03-21 00:08:47 -07:00
RElesgoe
bb0202c638 Merge pull request #292 from Dramacydal/icons
Fix logic in sending custom and user selected icons
2017-03-08 23:33:55 -08:00
Yaki Khadafi
577ccf75ab Fix logic in sending custom and user selected icons
- fix sending empty icons
- fix custom icons overriding user selected icons
- code style
2017-03-08 23:06:36 +03:00
HarpyWar
50c481dacb move language codes and countries in common.xml to allow manage languages (add/remove) without code modifications 2017-01-25 21:47:08 +03:00
HarpyWar
b78af39d26 Fix format mistakes from commit b245f6c6c9 2017-01-19 20:39:50 +03:00
HarpyWar
d55cb60630 Remove reduntant word "public" from whois, to return compatibility with Ghost bot spoof check
https://github.com/pvpgn/pvpgn-server/issues/126
https://github.com/pvpgn/pvpgn-server/issues/189
http://forums.pvpgn.pro/viewtopic.php?pid=8602#p8602
2017-01-18 12:53:24 +03:00
RElesgoe
61be2e63b6 Add VersionCheck entries for Diablo 2 and Diablo 2: Lord of Destruction 1.14a, 1.14b, 1.14c, and 1.14d 2017-01-17 10:43:04 -08:00
RElesgoe
026751e2cf Fix issue when displaying online users in the Windows GUI 2017-01-17 10:38:38 -08:00
RElesgoe
e2fb7975c0 Update fmt to 3.0.1 2017-01-17 10:36:25 -08:00
RElesgoe
30f085c71f Merge pull request #283 from Aloki/master
Fix #265, update README
2017-01-17 07:46:57 -08:00
Aleksei Danilov
fa61eba0d0 Fix pvpgn/pvpgn-server#265 2017-01-05 04:55:26 +03:00
Aleksei Danilov
860eb4c48e Two commands can be used 2017-01-04 21:26:40 +03:00
Aleksei Danilov
fe075e8a14 EPEL repo already have CMake 3.6 2017-01-04 21:15:34 +03:00
RElesgoe
cd17f6ab7d Merge pull request #282 from Aloki/master
Fix typo in command.cpp
2017-01-03 21:50:06 -08:00
Aleksei Danilov
b0ca992f00 Merge remote-tracking branch 'refs/remotes/origin/master' into pvpgn/master 2017-01-04 07:42:37 +03:00
Aleksei Danilov
ecb27e735a Fixes pvpgn/pvpgn-server#260 2017-01-04 04:42:22 +03:00
RElesgoe
a4c4b03394 Merge pull request #280 from cen1/extendbuildreadme
centos7 gcc fix
2016-12-30 13:40:24 -08:00
RElesgoe
4578376717 Merge pull request #279 from cen1/w3127b
versioncheck entry for w3 1.27b
2016-12-29 20:07:43 -08:00
RElesgoe
af3d0b5bdc Update ports.md 2016-12-29 18:08:31 -08:00
cen1
edb67aa81d centos7 gcc fix 2016-12-30 02:57:32 +01:00
cen1
ffdbd53a4f move old entries to the bottom 2016-12-30 02:54:35 +01:00
cen1
217d55cfb7 versioncheck entry for w3 1.27b 2016-12-28 18:25:20 +01:00
RElesgoe
dbf4ad5ec6 Update ports.md 2016-12-27 00:42:15 -08:00
RElesgoe
2d7e3ad65a Merge pull request #274 from cen1/libc++bydefault
use libc++ with clang by default
2016-12-27 00:34:20 -08:00
RElesgoe
5d3b663f60 Merge pull request #273 from cen1/extendbuildreadme
build instructions for more operating systems
2016-12-26 15:36:05 -08:00
cen1
34d4e02557 use libc++ with clang by default 2016-12-26 22:31:29 +01:00
cen1
13e7031a70 build instructions for more operating systems 2016-12-26 22:27:42 +01:00
HarpyWar
2f5da2232f Update appveyor.yml 2016-11-24 11:22:09 +03:00
HarpyWar
3d047578ce Update appveyor.yml 2016-11-23 22:49:43 +03:00
HarpyWar
8b8425b177 Update appveyor.yml 2016-11-23 22:48:39 +03:00
HarpyWar
83b996be76 Update appveyor.yml 2016-11-23 22:33:13 +03:00
HarpyWar
1963732161 Update appveyor.yml 2016-11-23 21:17:59 +03:00
HarpyWar
126bfb3aa8 Update appveyor.yml 2016-11-23 19:18:46 +03:00
HarpyWar
a8b7114300 Update appveyor.yml 2016-11-23 18:10:32 +03:00
HarpyWar
37447f04b7 Update appveyor.yml 2016-11-23 16:26:38 +03:00
HarpyWar
cdf08d3185 try appveyour artifacts
https://github.com/pvpgn/pvpgn-server/issues/264
2016-11-23 16:21:22 +03:00
RElesgoe
126d6146c4 Merge pull request #263 from Dramacydal/packet_limit
- move packet limit option to config
2016-11-21 23:39:39 -08:00
Yaki Khadafi
f00959c024 - move packet limit option to config 2016-11-18 20:39:30 +03:00
RElesgoe
178e4d8fc8 Update README.md 2016-10-04 00:08:03 -07:00
RElesgoe
dc3aac1666 Update README.md 2016-10-03 23:48:47 -07:00
RElesgoe
542865a0ab Merge pull request #257 from RElesgoe/master
Change version number from 1.99.7-PRO to 1.99.7.1-PRO
2016-09-10 15:55:35 -07:00
RElesgoe
326a076e48 Change version number from 1.99.7-PRO to 1.99.7.1-PRO 2016-09-10 14:25:33 -07:00
RElesgoe
f89d6937fd Merge pull request #256 from RElesgoe/master
Fix memory leaks and other issues
2016-09-10 14:21:59 -07:00
RElesgoe
b8a59f76d9 Prevent use of uninitialize variable in class AdBannerSelector 2016-09-10 12:03:42 -07:00
RElesgoe
0a5d4d8889 Fix resource leak in guiThread() 2016-09-10 11:58:18 -07:00
RElesgoe
9c043d372d Fix use after free in _handle_finger_command() 2016-09-10 11:55:02 -07:00
RElesgoe
a8b9059c59 Zero initialize variable 'cdkey_info' in client_connect() 2016-09-10 11:46:48 -07:00
RElesgoe
d33dc46cfb Fix memory leak in handle_anongame_join() 2016-09-10 11:44:15 -07:00
RElesgoe
5a72bdc7be Fix memory leak in d2ladder_saveladder() 2016-09-10 11:40:21 -07:00
RElesgoe
c13f76d95a Prevent using ininitialized variable in _client_supr() 2016-09-10 11:36:55 -07:00
RElesgoe
9026bff9bb Fix possible buffer overflow in KickDlgProc() 2016-09-10 11:35:58 -07:00
RElesgoe
f9b6c58709 Fix use after free in _handle_connections_command() 2016-09-10 11:33:19 -07:00
RElesgoe
16f27e75ab Update ports.md 2016-09-07 10:46:08 -07:00
RElesgoe
62566ddec9 Include common/setup_before.h before checking for HAVE_UNAME 2016-09-06 15:02:00 -07:00
RElesgoe
260313ed16 Prevent possible buffer overflows 2016-09-04 22:56:53 -07:00
RElesgoe
eb8a2754f8 Merge pull request #254 from RElesgoe/master
Fix memory leaks and compiler warnings
2016-09-04 22:47:58 -07:00
RElesgoe
e257a781a2 Merge branch 'master' of https://github.com/RElesgoe/pvpgn.git 2016-09-04 21:53:49 -07:00
RElesgoe
4d6dbff78e Fixed various compiler warnings 2016-09-04 21:53:44 -07:00
RElesgoe
0f6a62080a Added UID_FORMATF and GAMEID_FORMATF for compatibility 2016-08-29 01:21:32 -07:00
RElesgoe
511a0cfd5c Converted printf format specifiers for eventlog() calls 2016-08-29 01:00:07 -07:00
RElesgoe
e94d8a94bf Fixed memory leak in _ladder_send() when returning without calling packet_del_ref() on 'p' 2016-08-29 00:42:36 -07:00
RElesgoe
ae8ceede03 Fixed memory leak in _client_loginreq1() when returning without calling packet_del_ref() on 'rpacket' 2016-08-29 00:30:11 -07:00
RElesgoe
5a9ce9cce4 Fixed memory leak in _anongame_search_found() when returning without calling anongameinfo_destroy() on 'info' 2016-08-29 00:25:27 -07:00
RElesgoe
fb29dce9a4 Merge pull request #16 from pvpgn/master
Sync
2016-08-29 00:05:10 -07:00
HarpyWar
a19df85e2c Update appveyor.yml
save pdb files for gui version
2016-08-29 00:18:05 +03:00
HarpyWar
72778c7ece Update appveyor.yml
publish debug builds
2016-08-28 20:03:14 +03:00
RElesgoe
a2b80dc74e Merge pull request #253 from RElesgoe/master
Fix various issues
2016-08-28 03:24:32 -07:00
RElesgoe
6c63a455e7 Zero initialize variable 'rawname' in handle_file_packet() 2016-08-28 02:56:21 -07:00
RElesgoe
e759c4e7a8 Fix memory leak in customicons_stash_get_list() 2016-08-28 02:53:31 -07:00
RElesgoe
bbb2264de5 Fix possible buffer overflow in _news_cb() 2016-08-28 02:48:25 -07:00
RElesgoe
6870226159 Fix memory leak in _handle_topic_command() when returning without calling irc_unget_listelems() on variable 'e' 2016-08-28 02:46:51 -07:00
RElesgoe
71afce3904 Fix out of bounds access in anongame_gameresult_parse() when passing 'hero->level' to bn_int_get() instead of bn_short_get() 2016-08-28 02:44:29 -07:00
RElesgoe
379a8d76b7 Fix memory leak in _handle_verchk_command() when returning without calling xfree() on variable 'filestring' 2016-08-28 02:42:52 -07:00
RElesgoe
e2b354387d Fixed incorrect declaraction type of variable 'c' and 'prev_c' in userlog_read() 2016-08-28 02:33:30 -07:00
RElesgoe
049b029a95 Fix memory leak in _client_motdw3() when continuing loop without calling xfree() on variable 'line' 2016-08-28 02:27:17 -07:00
RElesgoe
13ac03d753 Fix memory leak in _handle_tos_command() when returning without calling xfree() on variable 'filename' 2016-08-28 02:24:23 -07:00
RElesgoe
e0cd3f7894 Fix memory leak in _handle_user_command() 2016-08-28 02:21:43 -07:00
RElesgoe
67a511cc3e Prevented use of uninitialized variable in _client_gsku() 2016-08-28 02:17:05 -07:00
RElesgoe
269334c9de Revert testing code in _handle_alert_command() 2016-08-28 02:16:02 -07:00
RElesgoe
699bdd42e3 Fix memory leak in d2cs's main() when returning without calling xfree() on variable 'pidfile' 2016-08-28 02:12:46 -07:00
RElesgoe
48291318e4 Fix possible buffer overflow in _client_motdw3() 2016-08-28 02:07:22 -07:00
RElesgoe
e05b18269e Prevented use of uninitialized variable in _client_flag() 2016-08-28 02:03:47 -07:00
RElesgoe
a521a8bb4f Ensure buffer is null terminated in d2charsave_init_from_d2s() 2016-08-28 02:00:16 -07:00
RElesgoe
3f892f03c2 Fix memory leak in d2charsave_init_from_d2s() 2016-08-28 01:59:59 -07:00
RElesgoe
4ca4e6b971 Fix resource leak in client_connect() 2016-08-28 01:50:03 -07:00
RElesgoe
846c4dc5a6 Fix out of bounds access in d2ladder_append_ladder() due to calling bn_int_get() instead of bn_byte_get on 'info->level' 2016-08-28 01:47:08 -07:00
RElesgoe
dee1d78a72 Fix memory leak in _handle_startg_command() when returning without calling irc_unget_listelems() on variable 'e' 2016-08-28 01:37:46 -07:00
RElesgoe
e7b81495dd Fix possible null pointer dereference in _client_clan_createinvitereply() 2016-08-28 01:31:19 -07:00
RElesgoe
427047a248 Fix possible buffer overflow in handle_irc_common_line() 2016-08-28 01:22:14 -07:00
RElesgoe
27d31a22d9 Added missing return statements in _client_createaccountw3() 2016-08-28 01:11:20 -07:00
RElesgoe
84bcf69fad Fix compile error 2016-08-24 01:25:47 -07:00
RElesgoe
3dfc1c97fa Simplified string copying code in tracker_send_report() 2016-08-24 01:10:08 -07:00
RElesgoe
f0ad3fae24 Prevent possible use of uninitialized variable in _client_createaccountw3() 2016-08-24 00:54:55 -07:00
RElesgoe
8c2c82a162 Fixed incorrect usages of std::swprintf() 2016-08-24 00:46:54 -07:00
RElesgoe
cc496b2fbd Fixed memory leak in userlog_read() 2016-08-24 00:41:09 -07:00
RElesgoe
3464cb38b8 Fixed memory leak in news_load() when returning without calling std::fclose() on variable 'fp' 2016-08-24 00:37:53 -07:00
RElesgoe
fb48daa92a Fixed memory leak in _handle_realmann_command() when returning without calling message_destroy() on variable 'message' 2016-08-24 00:36:04 -07:00
RElesgoe
a9f8ad46cb Fixed memory leak in conn_update_w3_playerinfo() when returning without calling xfree() in variable 'userincon' in a certain scenario 2016-08-24 00:33:45 -07:00
RElesgoe
c52e1836e7 Fixed dangling pointer return in conf_get_int() 2016-08-24 00:27:07 -07:00
RElesgoe
9783e19537 Prevent possible use of uninitialized variable in _client_crat() 2016-08-24 00:12:20 -07:00
RElesgoe
131bb8dd04 Prevented possible use of unitialized variable in _client_shrt() 2016-08-23 23:47:01 -07:00
RElesgoe
4c056aab0f Fixed possible memory leak in ipban_func_del() when returning without calling ipban_unload_entry() on variable 'to_delete' 2016-08-23 23:45:18 -07:00
RElesgoe
24041be4de Fixed memory leak in function _handle_motd_command() when returning without calling xfree() on variable 'filename' 2016-08-23 23:42:24 -07:00
RElesgoe
845e659100 Fixed memory leak in RLE_compress() when returning without calling xfree() on variable 'pktdata' 2016-08-23 23:40:51 -07:00
RElesgoe
44cb120a8d Fixed resource leak in make_minidump() when returning without calling FreeLibrary() on variable 'hDbgHelp' 2016-08-23 23:38:10 -07:00
RElesgoe
21402786df Fixed a memory leak in userlog_append() when returning without calling xfree() on variable 'filename' 2016-08-23 23:35:02 -07:00
RElesgoe
b460835af8 Prevent possible division/modulo by zero in anongame_get_map_from_prefs() 2016-08-23 21:05:44 -07:00
RElesgoe
24b92311a0 Fix memory leak in _handle_invmsg_command() when returning without calling irc_unget_listelems() on variable 'e' 2016-08-23 20:59:56 -07:00
RElesgoe
daee1995f9 Fix memory leak in _client_motdw3() when returning without calling xfree() on variable 'filename' 2016-08-23 20:57:34 -07:00
RElesgoe
6f3cd20c47 Fix memory leak in _client_clan_createinvitereq() when returning without calling packet_del_ref() on variable 'rpacket' 2016-08-23 20:54:46 -07:00
RElesgoe
3fe54ca634 Prevent usage of uninitialized variable in _client_sdfx() 2016-08-23 20:53:03 -07:00
RElesgoe
39ef8d5791 Fix memory leak in _client_loginreq2() when returning without calling packet_del_ref() on variable 'rpacket' 2016-08-23 20:38:03 -07:00
RElesgoe
6cbf39f611 Fix possible use after free in _handle_end_apiregtag() when looping through a list 2016-08-23 20:33:53 -07:00
RElesgoe
44d6c78ebf Fix possible null pointer dereference in _client_clanmember_rankupdatereq() when packet_get_str_const() returns a null pointer 2016-08-23 20:29:08 -07:00
RElesgoe
d7d6a192d9 Fix memory leak in _client_clanmember_rankupdatereq() when returning without calling packet_del_ref() on variable 'rpacket' 2016-08-23 20:25:48 -07:00
RElesgoe
09bb7569f4 Fix memory leak in apireg_send() when returning without calling packet_del_ref() on variable 'p' 2016-08-23 20:22:38 -07:00
RElesgoe
f1ea7d0c09 Fix out of bounds access in _client_extrawork() 2016-08-23 20:18:20 -07:00
RElesgoe
8bb8607897 Fix bug in message_telnet_format() when switch statement goes to case message_type_mode and falls into default case 2016-08-23 20:16:15 -07:00
RElesgoe
ae481691c7 Fix memory leak in character_create() when returning without freeing allocated memory in variable 'ch' 2016-08-23 20:09:15 -07:00
RElesgoe
e0ba035357 Fix bug in addr_create_str() when using a pointer that points to a variable that has gone out of scope 2016-08-23 20:01:18 -07:00
RElesgoe
603657f3e2 Fix memory leak in _client_friendslistreq() when returning without calling packet_del_ref() on rpacket 2016-08-23 19:34:00 -07:00
RElesgoe
a23f4e284c Merge pull request #252 from RElesgoe/master
Use fmt library for eventlog() calls
2016-08-23 17:16:24 -07:00
RElesgoe
89aa3ad327 Apply patch to fix handling of non-const unsigned char strings
https://github.com/fmtlib/fmt/issues/373
2016-08-23 16:44:48 -07:00
RElesgoe
795964d877 Fix compile error when compiling without WIN32_GUI due to defining a "printf" macro 2016-08-23 02:11:40 -07:00
RElesgoe
159e078bbf Merge branch 'master' of https://github.com/RElesgoe/pvpgn.git 2016-08-23 01:50:01 -07:00
RElesgoe
afed6da48b - Fix compile error when not compiling with WIN32_GUI
- Print passed error string when formatting fails in eventlog()
2016-08-23 01:49:59 -07:00
RElesgoe
5bdf3f4971 Merge pull request #15 from pvpgn/master
Sync
2016-08-23 01:38:03 -07:00
RElesgoe
d0dd295734 Fix CMakeLists.txt for /common/ 2016-08-23 01:33:52 -07:00
RElesgoe
b245f6c6c9 Use fmt library for type safe formatting when calling eventlog() 2016-08-23 01:29:06 -07:00
RElesgoe
1e6dc02155 Delete conversion-changelog 2016-08-18 02:28:35 -07:00
RElesgoe
33af5ee94f Delete README.cmake 2016-08-18 02:27:41 -07:00
RElesgoe
f876fc8c7b Delete README.ALPHA 2016-08-18 02:27:13 -07:00
RElesgoe
afd72200d2 Delete BUGS 2016-08-18 02:26:48 -07:00
RElesgoe
5aab53f8c7 Delete TODO 2016-08-18 02:26:41 -07:00
HarpyWar
0d9747a1ad Update quiz.lua
Fix Lua quiz break https://github.com/pvpgn/pvpgn-server/issues/196
2016-08-18 09:40:05 +03:00
RElesgoe
49cffbae75 Merge pull request #250 from RElesgoe/master
Fix typo
2016-08-13 12:20:06 -07:00
xboi209
34d5d3e4fb Fix typo 2016-08-13 12:05:54 -07:00
RElesgoe
1fa987f473 Merge pull request #248 from RElesgoe/master
Update Travis CI to use Trusty (Ubuntu 14.04)
2016-08-13 05:44:36 -07:00
xboi209
b2803cf020 Export variables in Travis CI .yml 2016-08-13 04:33:59 -07:00
xboi209
e1eab3f7a8 Fix 2016-08-13 04:28:01 -07:00
xboi209
2b91ebf697 Fix apt sources in Travis CI .yml 2016-08-13 04:25:50 -07:00
xboi209
661b3a13a3 Remove tab characters from Travis CI .yml 2016-08-13 04:20:39 -07:00
xboi209
ffaa8e45cd Travis CI use Trusty (Ubuntu 14.04) 2016-08-13 04:10:39 -07:00
RElesgoe
4987e41cad Merge pull request #247 from RElesgoe/master
Update fmt (formerly C++ Format) to 3.0.0
2016-08-13 03:14:10 -07:00
xboi209
b63b4756e4 Update to fmt 3.0.0 2016-08-12 23:35:15 -07:00
RElesgoe
58c6d6cb4e Merge pull request #245 from RElesgoe/master
Fix value comparison bug in tracker.cpp
2016-08-12 23:05:57 -07:00
xboi209
f336183eb6 Fix value comparison bug in tracker.cpp 2016-08-12 22:19:54 -07:00
RElesgoe
9763715f70 Merge pull request #244 from RElesgoe/master
Use wide functions from WinAPI when possible and update greeting message
2016-08-12 22:01:00 -07:00
xboi209
b12ebbacd4 Move Windows-specific code to appropriate #ifdef block 2016-08-12 21:17:17 -07:00
xboi209
96d017284f - Use narrow functions in sql_odbc.cpp
- Remove use of TCHAR types
2016-08-12 20:54:35 -07:00
xboi209
1e36d4995d Update greeting message in pvpgn_greeting() 2016-08-12 18:40:10 -07:00
xboi209
09d012360b - Use wide functions instead of narrow functions when using WinAPI
- Use RtlGetVersion() instead of GetVersionEx()
2016-08-12 18:34:04 -07:00
RElesgoe
b9beb3b495 Merge pull request #240 from RElesgoe/master
Use standard typedefs and fix format specifiers
2016-08-12 04:58:03 -07:00
xboi209
cd394c6905 Fix mistakes with format specifiers 2016-08-12 00:36:23 -07:00
xboi209
e1dee887df Fix incorrect format specifiers 2016-08-12 00:20:22 -07:00
xboi209
77c209318f Fix previous commit 2016-08-11 22:53:37 -07:00
xboi209
42e3a6680b Use standard typedefs from <cstdint> 2016-08-11 22:47:12 -07:00
RElesgoe
78516e1db3 Merge pull request #237 from RElesgoe/master
Use singleton class for ad banner
2016-08-11 21:37:40 -07:00
xboi209
8fd10d01dc Use singleton class for ad banner 2016-08-11 17:42:24 -07:00
RElesgoe
fc82715c61 Merge pull request #234 from RElesgoe/master
Fix compile errors
2016-08-05 16:43:41 -07:00
xboi209
f828993102 Fix compile errors 2016-08-05 04:32:54 -07:00
xboi209
01499ccd5b Fix compile error 2016-08-05 02:37:49 -07:00
xboi209
de866c1ba5 Merge branch 'master' of https://github.com/RElesgoe/pvpgn.git 2016-08-05 02:24:52 -07:00
xboi209
ca6acfd419 Fix compile error 2016-08-05 02:24:49 -07:00
RElesgoe
ae761897a0 Merge pull request #232 from RElesgoe/master 2016-08-05 01:46:12 -07:00
RElesgoe
6c29c0edc0 Merge pull request #14 from pvpgn/master
Sync
2016-08-05 01:44:26 -07:00
xboi209
6436e2fe9b Remove track.muleslow.net from the tracker list 2016-08-05 01:43:04 -07:00
RElesgoe
81b8dcd879 Remove dynamic exception specification from functions in luawrapper.c… (#231)
* Remove dynamic exception specification from functions in luawrapper.cpp and luawrapper.h

* Added missing semicolon
2016-08-05 01:40:09 -07:00
xboi209
134448e67a Added missing semicolon 2016-08-05 01:39:49 -07:00
xboi209
dbef3aa172 Remove dynamic exception specification from functions in luawrapper.cpp and luawrapper.h 2016-08-05 01:37:19 -07:00
RElesgoe
ae7f41a2b8 Merge pull request #229 from RElesgoe/master
Removed unreferenced variables
2016-08-05 01:00:35 -07:00
xboi209
3400a2a3ee Removed unreferenced variables 2016-08-05 01:00:00 -07:00
RElesgoe
ceb67ed09a Merge pull request #228 from RElesgoe/master
Update trackers
2016-08-05 00:54:01 -07:00
xboi209
48807fdbfb - Remove track.dreaming-bg.com tracker (dead)
- Add track.eurobattle.net tracker
2016-08-05 00:53:12 -07:00
RElesgoe
81c35b65f0 Merge pull request #227 from RElesgoe/master
Possible crash at userlog_read() when an argument is a null pointer
2016-08-05 00:50:16 -07:00
xboi209
179c547459 Possible crash at userlog_read() when an argument is a null pointer 2016-08-05 00:48:42 -07:00
RElesgoe
3a95a5dda4 Merge pull request #223 from RElesgoe/master
Sync
2016-08-04 22:24:16 -07:00
xboi209
0a57d3f700 Fix casing on ver-IX86-1.mpq 2016-08-04 21:42:32 -07:00
xboi209
bb5b6a94ba Define the ad.json format specification 2016-08-04 21:22:49 -07:00
xboi209
38ae37fb5b - Update CheckRevision ver-IX86-*.mpq files
- Use ver-IX86-1.mpq for WarCraft 3
2016-08-04 20:31:50 -07:00
xboi209
d5ec921422 Create VersionCheck entry for WarCraft 3: Reign of Chaos 1.27a 2016-08-04 19:58:33 -07:00
xboi209
1505fc5238 Move VersionCheck entries for WarCraft 3 1.26a to Older Versions section 2016-08-04 19:55:42 -07:00
xboi209
c68aff0a1a Update JSON for Modern C++ to v2.0.2 2016-08-04 19:52:02 -07:00
RElesgoe
bc74c5b602 Merge pull request #211 from RElesgoe/master
Fix exception when attempting to select an invalid ad id
2016-07-01 02:00:11 -07:00
xboi209
2639fa9578 - Fixed exception when attempting to select an invalid ad id 2016-07-01 01:58:32 -07:00
RElesgoe
295f9d481a Merge pull request #204 from RElesgoe/master
Modify bnetd.conf.win32 to use ad.json instead of ad.conf
2016-05-24 17:54:14 -07:00
xboi209
23b7a5de56 Modified bnetd.conf.win32 to use ad.json instead of ad.conf 2016-05-24 17:53:02 -07:00
RElesgoe
c99de23626 Merge pull request #203 from RElesgoe/master
Use JSON configuration file for Ad Banners
2016-05-24 13:28:17 -07:00
xboi209
a42ec6f6ab Corrected format specifier for std::size_t 2016-05-24 04:14:11 -07:00
xboi209
d906975dfc Remove unused includes in adbanner.cpp and adbanner.h 2016-05-24 04:01:48 -07:00
xboi209
505633aba0 PvPGN now loads ads configuration in JSON format 2016-05-24 03:58:39 -07:00
xboi209
8102febfd3 Updated json.hpp to correct file 2016-05-23 21:06:30 -07:00
xboi209
c036a43bd3 Update to JSON for Modern C++ 2.0.0 commit a3f432b3dde1d71c8940961947db5938ed11ee91 2016-05-23 21:02:22 -07:00
xboi209
214861038b Update to JSON for Modern C++ 2.0.0 commit a3f432b3dde1d71c8940961947db5938ed11ee91 2016-05-23 20:59:25 -07:00
xboi209
cc393bb543 Add JSON for Modern C++ 1.1.0 2016-05-23 14:24:13 -07:00
RElesgoe
315f45ce4f Merge pull request #202 from RElesgoe/master
Sync
2016-05-23 13:46:03 -07:00
RElesgoe
94dc3e627f Merge pull request #13 from pvpgn/master
Sync
2016-05-23 13:45:37 -07:00
xboi209
2461e895e7 Merge pull request #198 from cen1/wc3_127a
Support for W3 patch 1.27a
2016-04-14 18:20:22 -07:00
cen1
3f1b18ed7f Support for W3 patch 1.27a 2016-04-02 15:19:54 +02:00
xboi209
cbca36ac7d Merge pull request #193 from cen1/bsdfix
FreeBSD compilation error fixes
2015-11-16 19:38:30 -08:00
xboi209
0b98e4fafa Update .travis.yml
Add --no-check-certificate to wget parameter
2015-11-16 13:24:53 -08:00
xboi209
c0b126379c Update .travis.yml
Force Travis to use CMake 3.4.0
2015-11-16 13:02:58 -08:00
cen1
9b6f38028f Merge branch 'master' of https://github.com/pvpgn/pvpgn-server into bsdfix 2015-11-16 20:03:21 +01:00
cen1
4d20b91580 Merge branch 'master' of https://github.com/pvpgn/pvpgn-server into bsdfix 2015-11-16 19:47:55 +01:00
cen1
7fa9f0430a Changed string to reference 2015-11-16 19:31:18 +01:00
cen1
3914288b05 Corrected fix for clang 2015-11-16 12:07:53 +01:00
cen1
a8901d9edc Fix event.h cmake find on freebsd 2015-11-16 11:59:23 +01:00
cen1
788b167ddd FIx compile with clang 2015-11-16 11:57:54 +01:00
xboi209
9385d027a2 Use std::string()'s 2015-11-03 17:41:00 -08:00
xboi209
1303e41913 Fix compile error on FreeBSD 10.2 with Clang 3.4.1 2015-10-31 01:21:01 -07:00
xboi209
72a3d92e5c Use std::string's 2015-10-31 01:13:24 -07:00
xboi209
b2ceee18e7 Merge pull request #180 from xboi209/master
Remove unused/unneeded defines
2015-10-17 16:05:18 -07:00
xboi209
c0f2c3968e - Removed HAVE_STRTOUL 2015-10-17 13:45:41 -07:00
xboi209
ddb665a543 - Removed HAVE_GETENV 2015-10-17 13:37:21 -07:00
xboi209
ebfb1b97fe - Removed HAVE_UNAME duplicate 2015-10-17 13:33:00 -07:00
xboi209
597f394d46 - Removed HAVE_VSNPRINTF 2015-10-17 13:30:18 -07:00
xboi209
a1f80f108f - Removed HAVE_DIFFTIME
- Removed HAVE_INDEX
- Removed HAVE_RINDEX
- Removed HAVE_STRCHR
- Removed HAVE_STRRCHR
2015-10-17 13:26:49 -07:00
xboi209
6f9294d198 Undo tmp change 2015-10-17 13:16:06 -07:00
xboi209
d1ac041bf5 - Removed check for HAVE_MKTIME 2015-10-17 13:15:41 -07:00
xboi209
534da8445a - Removed HAVE_SNPRINTF defines 2015-10-17 13:11:46 -07:00
xboi209
4908e192dd - Removed src/win32/configwin.h 2015-10-17 13:10:28 -07:00
xboi209
3ce35b1a83 Additional tested configurations 2015-10-17 12:40:49 -07:00
xboi209
92b8f9fea6 Merge pull request #178 from xboi209/master
Various Changes
2015-10-16 19:17:09 -07:00
xboi209
9cd2ef2b4b Updated docs files to use markdown 2015-10-16 17:13:24 -07:00
xboi209
ce56cf1619 Uncomment max_accounts in bnetd.conf 2015-10-12 16:03:39 -07:00
xboi209
9e3ba4e31a Use trace instead of error in friendlist_close() 2015-10-12 15:35:36 -07:00
xboi209
a5c1a8ed1e Revert account_set_rawattr() which caused a crash when creating a new account in WC3 2015-10-12 15:33:05 -07:00
xboi209
fc3080f447 Merge branch 'master' of https://github.com/xboi209/pvpgn.git 2015-10-10 13:54:34 -07:00
xboi209
33b4b61c95 Pass compiler flags for Clang 2015-10-10 13:54:31 -07:00
xboi209
0cb70c3264 Merge pull request #12 from pvpgn/master
Sync with HarpyWar
2015-10-09 20:44:53 -07:00
xboi209
5a455db8e2 Remove the -ansi flag 2015-10-09 20:41:08 -07:00
xboi209
664923370d Forgot to remove snprintf.cpp from compat/CMakeLists.txt 2015-10-09 20:23:21 -07:00
xboi209
7ba2bfab8b Rewrite account_wrap.cpp to use std::string()'s 2015-10-09 20:17:28 -07:00
xboi209
1aa1ecab6a Remove snprintf shim 2015-10-09 15:54:45 -07:00
xboi209
28752e8bd8 Optimized munge() by not calling strlen() in loop 2015-10-01 04:51:58 -07:00
xboi209
e45f503d2f Created a reference for topic->topicstr in class_topic::display() 2015-10-01 04:50:10 -07:00
xboi209
b907b28f51 Removed check for non-null pointer 2015-10-01 04:45:28 -07:00
xboi209
cfb327493d Corrected wrong format specifiers 2015-10-01 04:42:19 -07:00
xboi209
5a788bf6ce Optimized various functions in topic.cpp by declaring function parameters as constant 2015-10-01 04:36:06 -07:00
xboi209
6fdca215fc Removed unused variable 'when' 2015-10-01 04:32:35 -07:00
xboi209
a8bd7f2f0f Optimized tournament_init() by not calling strlen() in loop 2015-10-01 04:32:15 -07:00
xboi209
f2ddd3c6f5 Optimized customicons_load() by not calling strlen() in loop 2015-10-01 04:31:31 -07:00
xboi209
e477de2052 Removed check for non-null pointer 2015-10-01 04:28:44 -07:00
xboi209
a18107407f Removed check for non-null pointer 2015-10-01 04:28:26 -07:00
xboi209
4844c0c989 Optimized checks for empty strings 2015-10-01 04:24:28 -07:00
xboi209
c0db97afd6 Optimized versioncheck_compare_exeinfo() by not calling strlen() on every loop 2015-10-01 04:20:04 -07:00
xboi209
9948a600fc Optimized userlog_read() by not calling strlen() on every loop 2015-10-01 04:19:13 -07:00
xboi209
8be043e97e Optimized userlog_append() by not calling strlen() on every loop 2015-10-01 04:17:25 -07:00
xboi209
973141b193 Removed unused variable 'token' 2015-10-01 04:16:03 -07:00
xboi209
18c6de18da Removed unused variable 'istr' 2015-10-01 04:15:42 -07:00
xboi209
5f65085527 Optimized ipban_could_be_ip_str() by not calling strlen() on every loop 2015-10-01 04:15:18 -07:00
xboi209
b21db674c9 Optimized file_find_localized() by not calling strlen() on every loop 2015-10-01 04:13:39 -07:00
xboi209
6262ec0f01 Optimized replace_args() by not calling strlen() on every loop 2015-10-01 04:12:13 -07:00
xboi209
7c8f939bc1 Optimized account_check_name() by not calling strlen() on every loop 2015-10-01 04:10:21 -07:00
xboi209
39f58d3c9f Removed unused variable 'clients' 2015-10-01 04:08:05 -07:00
xboi209
a717515e7a Corrected wrong format specifiers 2015-10-01 04:03:57 -07:00
xboi209
2bda96bbc4 Corrected wrong format specifier 2015-10-01 04:01:57 -07:00
xboi209
8ea6bfe401 Corrected wrong format specifiers 2015-10-01 04:00:44 -07:00
xboi209
4cf7bb0cb2 Added explicit check for strcasecmp()'s return value 2015-10-01 03:59:49 -07:00
xboi209
0e7941a774 Corrected wrong format specifiers 2015-10-01 03:56:45 -07:00
xboi209
73ec155553 Corrected wrong format specifier 2015-10-01 03:55:06 -07:00
xboi209
b17bbe7a2f Corrected wrong format specifiers in anongame_wol.cpp 2015-10-01 03:51:49 -07:00
xboi209
c99246bcf4 Check the return value of LoadLibrary() 2015-10-01 03:49:40 -07:00
xboi209
5d279da11f Removed useless check for 'clan' 2015-10-01 03:46:30 -07:00
xboi209
289272945a 'filenamestk' is always not equal to a null pointer, remove check 2015-10-01 03:43:01 -07:00
xboi209
11e2b9fd94 - Minor code improvements to the Topics system
- Empty lines in the topic file no longer displays an error in the eventlog
- Added checks for duplicate lines in the topic file
- Optimized code to only write data from memory to the topic file if it doesn't already exist
2015-09-27 22:40:54 -07:00
HarpyWar
38f36b28ee automate windows builds for all storage types 2015-09-23 22:14:02 +03:00
HarpyWar
200ec3b48d fix error with cmake 3.3 when parsing string with brackets
"$ENV{PROGRAMFILES(x86)}/MySQL/*/include"
2015-09-23 22:11:05 +03:00
xboi209
db3c77558d Merge pull request #172 from xboi209/master
Various changes
2015-09-22 18:13:45 -07:00
xboi209
de13ce5351 Unreferenced local variable 'i' in sha1hash.cpp 2015-09-22 17:29:53 -07:00
xboi209
4b61afde1b Unreferenced local variable 'i' in bnchat.cpp 2015-09-22 17:29:34 -07:00
xboi209
1ee46e84ea Fixed truncation warnings in i18n.cpp 2015-09-22 17:28:50 -07:00
xboi209
9d126f9cc8 Return bool type in conn_wol_get_findme() and conn_wol_get_pageme() 2015-09-22 17:21:45 -07:00
xboi209
40d3b09edb Changed comparison between int and bool to int and int in clan_remove_member() 2015-09-22 17:16:38 -07:00
xboi209
96e1b8ef01 Do not initialize and declare extern variable 'countries' at the same time 2015-09-22 17:12:07 -07:00
xboi209
b5aca7a9cd Fixed mistake from previous commit 2015-09-22 17:09:33 -07:00
xboi209
caf4b212ff Fixed improper eventlog() calls 2015-09-22 16:49:35 -07:00
xboi209
3d51d15182 Fixed improper eventlog() calls 2015-09-22 16:34:55 -07:00
xboi209
1c22743786 Fixed compile error when compiling with SQL 2015-09-22 16:31:19 -07:00
xboi209
fa9cf3a329 Don't use NULL when a non-pointer is expected 2015-09-22 11:44:47 -07:00
xboi209
534206717a Don't use NULL when returning in tag_validate_client() 2015-09-22 11:35:29 -07:00
xboi209
1ae129e8f9 Fixed improper eventlog() calls 2015-09-22 11:30:55 -07:00
xboi209
4e0f62daef Fix non-conforming ISO C++ code 2015-09-22 11:23:05 -07:00
xboi209
5542dbd7d7 Fixed conflicting declaration of sql_tables 2015-09-22 11:19:27 -07:00
xboi209
01e9483bb4 Avoid fpermissive warning in G++ 2015-09-22 10:20:08 -07:00
xboi209
c4ea37bde7 Fix previous commit 2015-09-22 10:02:21 -07:00
xboi209
3422fb3990 Fix AppVeyor build issue 2015-09-22 09:58:55 -07:00
xboi209
f57a8c4a55 Force AppVeyor to use v140 build tools 2015-09-22 09:46:31 -07:00
xboi209
863c0cdcd0 Force AppVeyor to use Visual Studio 2015 2015-09-22 09:42:56 -07:00
xboi209
a8fbd54e2b - Force Travis to use CMake 3.3.2
- Force appveyor to use Visual Studio 2015
2015-09-22 09:39:03 -07:00
xboi209
08bd745c42 - Force Travis to use CMake 3.3.2
- Force appveyor to use Visual Studio 2015
2015-09-22 09:31:59 -07:00
xboi209
0274999f1a Merge branch 'master' of https://github.com/xboi209/pvpgn.git 2015-09-22 09:26:36 -07:00
xboi209
dce287825e Update minimum required compiler version to G++ 5.1 and Visual Studio 2015 2015-09-22 09:26:34 -07:00
xboi209
c9c78623b2 Merge pull request #11 from pvpgn/master
Sync with HarpyWar
2015-09-22 09:00:22 -07:00
HarpyWar
224fed7598 restrict check for STARTGAME4 packet length for starcraft client only
https://github.com/pvpgn/pvpgn-server/issues/159
2015-09-22 18:40:01 +03:00
HarpyWar
f19ca1afa2 update appveyor badge url 2015-09-22 14:48:49 +03:00
HarpyWar
7e7a371d45 update links to the repository due to move it to "pvpgn" organization 2015-09-22 13:46:18 +03:00
xboi209
d656e16493 Merge pull request #10 from HarpyWar/master
fix "WITH SQL" compile errors for Visual Studio 2015 (continuation of…
2015-09-21 21:30:26 -07:00
HarpyWar
bd08cc8d78 fix "WITH SQL" compile errors for Visual Studio 2015 (continuation of https://github.com/HarpyWar/pvpgn/pull/163) 2015-09-21 21:42:10 +03:00
xboi209
2660145b37 Implement C++14's make_unique 2015-09-20 20:10:28 -07:00
xboi209
b645515eee Overhaul topic.cpp and topic.h 2015-09-20 20:09:17 -07:00
xboi209
cac1d19a11 Removed redundant code in sha1_hash() and bnet_hash() 2015-09-06 11:43:12 -07:00
xboi209
d4085f218e Remove inet_ntoa, use inet_ntop 2015-09-06 11:25:48 -07:00
xboi209
4472050fb8 Remove inet_aton, use inet_pton 2015-09-06 10:49:42 -07:00
xboi209
0110ccd7a7 Revert change, can't figure out why this xfree() causes a crash 2015-08-26 01:18:22 -07:00
xboi209
177c482c7e Fixed mistake when attempting to free memory too early in userlog_filename() 2015-08-26 01:08:53 -07:00
xboi209
6ebdee268f Use xfree() instead of free() in anongame_infos_DESC_destroy() 2015-08-26 00:56:30 -07:00
xboi209
df840e101c Fixed mistake in checking for a failure from list_remove_elem() in friends.cpp 2015-08-26 00:53:34 -07:00
xboi209
ed37d44001 Fixed memory leaks in userlog_append() and userlog_filename() 2015-08-26 00:52:52 -07:00
xboi209
03b1c5e35c Fixed mistake in checking for a failure from list_remove_data() in friends.cpp 2015-08-26 00:16:24 -07:00
xboi209
638ab9e402 Make file_get_info() more consistent 2015-08-26 00:15:24 -07:00
xboi209
b171e72586 std::atexit() wasn't what I thought it was... 2015-08-25 23:58:44 -07:00
xboi209
61d3be9470 - Rewrote friends.cpp
- Created a new-handler function to handle out of memory failures by operator new
2015-08-25 23:55:30 -07:00
xboi209
0ef8c1990f Fix previous commit 2015-08-24 12:19:43 -07:00
xboi209
b586b8e60d Simplify some functions using C++ 2015-08-24 12:17:48 -07:00
xboi209
21adb496b7 Fix non-ISO C++ conformant code 2015-08-24 03:17:12 -07:00
xboi209
5a1e471e8b std::auto_ptr is deprecated in C++11, replace with std::unique_ptr 2015-08-24 02:55:31 -07:00
xboi209
ae45207b29 - Minimum CMake version: 3.1.0
- Minimum G++ version: 4.8
- Minimum Visual Studio version: VS2012
- Added '-std=c++11' flag to G++
- Removed unused defines
- Removed checks for standard library headers
- Added CMake detections of '_vsnprintf' and '_snprintf' for Visual Studio 2015
- Removed bnpcap
- Force Travis CI to use CMake 3.1.3 and G++5
2015-08-24 02:30:17 -07:00
xboi209
98f7165e21 Merge pull request #9 from HarpyWar/master
Sync
2015-08-23 00:03:57 -07:00
HarpyWar
5f9d7d6b9e Merge pull request #164 from xboi209/memleak
Memleak
2015-08-20 16:15:48 +03:00
HarpyWar
d1c2be66ae Merge pull request #163 from xboi209/master
Fix compile errors for Visual Studio 2015
2015-08-20 16:15:28 +03:00
xboi209
e299aadee0 Remove __cdecl because it's unnecessary and non portable 2015-08-13 12:51:05 -07:00
xboi209
a27a181e52 Change _cdecl to __cdecl 2015-08-13 12:45:48 -07:00
xboi209
52d112644b Fixed leaks 2015-08-13 12:39:19 -07:00
xboi209
eea783b1a0 Fixed memory leak from attrgroup_flush() 2015-08-13 10:23:38 -07:00
xboi209
85965c7804 Fixed mistake 2015-08-13 09:39:51 -07:00
xboi209
9a5be8f445 - Fix snprintf and vsnprintf detection errors for Visual Studio 2015 in CMake
- Fix user-defined literal errors for Visual Studio 2015
2015-08-01 02:41:45 -07:00
HarpyWar
095cdee275 Merge pull request #154 from xboi209/patch-11
Close fp in customicons_load()
2015-06-28 10:31:41 +03:00
HarpyWar
aee1deec82 Merge pull request #148 from xboi209/patch-8
Do not define snprintf() as _snprintf()
2015-06-28 10:31:35 +03:00
HarpyWar
4fb5e7617d Merge pull request #146 from xboi209/afxres
Fix compile error when MFC is not installed
2015-06-28 10:31:21 +03:00
HarpyWar
5bfea3a1ea Merge pull request #144 from xboi209/cleanup
Cleanup
2015-06-28 10:31:15 +03:00
HarpyWar
3560aa1bd6 Merge pull request #143 from cen1/findmysql
On windows, mysql lib name is apparently libmysql, at least it was in my...
2015-06-28 10:31:02 +03:00
HarpyWar
8c446098f7 Merge pull request #142 from cen1/118
Fixed a warning from Ref #118. Plus has priority over dereference. I was...
2015-06-28 10:30:56 +03:00
xboi209
6f788b393c Update icons.cpp 2015-05-16 11:54:28 -07:00
xboi209
c742aeec3f Update icons.cpp 2015-05-16 11:42:55 -07:00
xboi209
72be079079 Close fp in customicons_load() 2015-05-16 11:30:40 -07:00
HarpyWar
c35b876e4d Merge pull request #151 from xboi209/patch-10
Update and rename Compile.Instructions.Win32.VS.Net2005.txt to Compile.I...
2015-04-01 12:27:51 +03:00
xboi209
f2c97b23ab Update Compile.Instructions.Win32.VS2013.txt 2015-03-24 11:26:04 -07:00
xboi209
1a97ed5c1f Update and rename Compile.Instructions.Win32.VS.Net2005.txt to Compile.Instructions.Win32.VS2013.txt 2015-03-23 15:03:37 -07:00
HarpyWar
f26ee365ee Merge pull request #150 from xboi209/patch-9
Deleaker
2015-03-23 11:40:49 +03:00
xboi209
f206be7af1 Update README.DEV
Deleaker
2015-03-23 01:33:40 -07:00
xboi209
316f14808c Update README.md
Deleaker
2015-03-22 14:49:11 -07:00
xboi209
9d1085b343 snprintf() is no longer defined as, if available, _snprintf() 2015-03-15 10:58:59 -07:00
xboi209
af44d9afdc Fix compile error when MFC is not installed 2015-03-13 23:06:52 -07:00
xboi209
b9c500f11a fix compile issue 2015-03-08 21:49:01 -07:00
xboi209
6511cb9e02 fix compile issue 2015-03-08 21:45:10 -07:00
xboi209
cc099ac1b0 fix compile issue 2015-03-08 21:41:05 -07:00
xboi209
7aabe19c8a fix compile issue 2015-03-08 21:36:32 -07:00
xboi209
16271f6488 warning C4101: 'end_lines' : unreferenced local variable
warning C4101: 'start_lines' : unreferenced local variable
2015-03-08 21:14:09 -07:00
xboi209
67a08a0671 warning C4101: 'player' : unreferenced local variable
warning C4101: 'ctag' : unreferenced local variable
warning C4101: 'channelname' : unreferenced local variable
2015-03-08 21:13:22 -07:00
xboi209
aeb08c5eb6 warning C4101: 'clienttag_str' : unreferenced local variable
warning C4101: 'item' : unreferenced local variable
warning C4101: 'item' : unreferenced local variable
warning C4101: 'usericon' : unreferenced local variable
warning C4101: 'uicon' : unreferenced local variable
warning C4101: 'curr_icon' : unreferenced local variable
2015-03-08 21:12:53 -07:00
xboi209
be0e98089a warning C4715: 'pvpgn::bnetd::irc_send_rpl_namreply_internal' : not all control paths return a value 2015-03-08 21:11:44 -07:00
xboi209
0738110702 warning C4101: 'pid' : unreferenced local variable 2015-03-08 21:10:33 -07:00
xboi209
0f8b242914 warning C4101: 'rating' : unreferenced local variable 2015-03-08 21:10:18 -07:00
xboi209
cc440af5ee warning C4101: 'temp_' : unreferenced local variable 2015-03-08 21:09:58 -07:00
xboi209
47de763487 warning C4715: 'pvpgn::bnetd::_ladder_is_integer' : not all control paths return a value 2015-03-08 21:09:39 -07:00
xboi209
f343d5152b warning C4101: 'i' : unreferenced local variable 2015-03-08 21:08:38 -07:00
xboi209
7fea5f9d54 warning C4101: '_temp' : unreferenced local variable
warning C4101: 'ircname' : unreferenced local variable
warning C4101: 'temp' : unreferenced local variable
2015-03-08 21:08:00 -07:00
xboi209
592227bf0f warning C4101: 'p' : unreferenced local variable
warning C4101: 'j' : unreferenced local variable
warning C4101: 'ircname' : unreferenced local variable
warning C4101: 'temp' : unreferenced local variable
2015-03-08 21:07:20 -07:00
xboi209
d4c35f5dbc warning C4101: 'test' : unreferenced local variable 2015-03-08 21:06:27 -07:00
xboi209
8bda8e3b49 warning C4101: 'i' : unreferenced local variable 2015-03-08 21:06:15 -07:00
xboi209
a1617bdb6a warning C4101: 'server_public_key' : unreferenced local variable
warning C4101: 'passhash' : unreferenced local variable
warning C4101: 'server_public_key' : unreferenced local variable
warning C4101: 'clienthash' : unreferenced local variable
warning C4101: 'serverhash' : unreferenced local variable
warning C4101: 'memory' : unreferenced local variable
warning C4101: 'rpacket' : unreferenced local variable
2015-03-08 21:05:48 -07:00
xboi209
262d9ba9fd warning C4101: 'apiregmember' : unreferenced local variable
warning C4101: 'apiregmember' : unreferenced local variable
2015-03-08 21:03:56 -07:00
xboi209
f3a6863290 warning C4101: 'ctag' : unreferenced local variable 2015-03-08 21:03:04 -07:00
xboi209
441fd71bcf warning C4101: 'game' : unreferenced local variable 2015-03-08 21:02:45 -07:00
xboi209
b74f81c905 warning C4101: 'pid' : unreferenced local variable 2015-03-08 21:02:17 -07:00
xboi209
7aacc75acd warning C4101: 'ctag' : unreferenced local variable
warning C4101: 'i' : unreferenced local variable
warning C4101: 'j' : unreferenced local variable
warning C4101: 'i' : unreferenced local variable
warning C4101: 'j' : unreferenced local variable
warning C4101: 'i' : unreferenced local variable
warning C4101: 'j' : unreferenced local variable
warning C4101: 'j' : unreferenced local variable
warning C4101: 'i' : unreferenced local variable
warning C4101: 'i' : unreferenced local variable
warning C4101: 'i' : unreferenced local variable
warning C4101: 'j' : unreferenced local variable
warning C4101: 'i' : unreferenced local variable
warning C4101: 'j' : unreferenced local variable
warning C4101: 'i' : unreferenced local variable
warning C4101: 'j' : unreferenced local variable
warning C4101: 'channel_name' : unreferenced local variable
warning C4101: 'topic' : unreferenced local variable
2015-03-08 21:01:35 -07:00
xboi209
72d3b6cd8e warning C4101: 'pid' : unreferenced local variable 2015-03-08 20:56:02 -07:00
xboi209
e7a62d3f7d warning C4101: 'i' : unreferenced local variable 2015-03-08 20:55:24 -07:00
xboi209
c13851adef warning C4101: 'output' : unreferenced local variable
warning C4101: 'data' : unreferenced local variable
2015-03-08 20:54:46 -07:00
xboi209
a069abf63d warning C4101: 'i' : unreferenced local variable 2015-03-08 20:54:16 -07:00
xboi209
01b179d7e1 warning C4101: 'end_lines' : unreferenced local variable
warning C4101: 'start_lines' : unreferenced local variable
2015-03-08 20:53:37 -07:00
cen
1a28831d98 On windows, mysql lib name is apparently libmysql, at least it was in my installation 2015-03-02 19:18:27 +01:00
cen
3532ba199b Fixed a warning from Ref #118. Plus has priority over dereference. I was actually unable to replicate the warning on VS2013 even with /Wall 2015-03-02 16:45:35 +01:00
xboi209
760a98a70b Merge pull request #7 from HarpyWar/master
Sync
2015-02-13 08:17:37 -08:00
HarpyWar
11d67dbb87 Merge pull request #135 from xboi209/memleak
PR
2015-02-12 20:18:36 +03:00
xboi209
5013aac4c4 Update account_wrap.cpp
Added missing comma
2015-02-12 07:26:41 -08:00
HarpyWar
0fb418ef15 Merge pull request #133 from Kelwing/master
Fixed the first issue in #118
2015-02-11 23:58:45 +03:00
Jacob Wiltse
c3994f023d Fixed formatting, really? we're using actual tab characters? 2015-02-10 13:35:42 -05:00
Jacob Wiltse
ee7ba4034b Added = operator definition to iterator in elist.h. Ref #118 2015-02-10 13:27:55 -05:00
HarpyWar
ae2d0e4359 refactoring tolower functions
=> fix "debug assertion failed" on Windows that appears in Debug mode due to non-ascii symbols in user input
=> now it's possible use utf-8 symbols for password and login (it works in Warcraft 3)
2015-02-09 20:44:28 +03:00
xboi209
19fbaa5c51 Update account_wrap.cpp
Reorder headers
2015-02-09 08:33:07 -08:00
xboi209
fd904b23d1 Update account_wrap.cpp
Fixed some mistakes from previous commit
2015-02-09 08:29:12 -08:00
xboi209
de7ddf5300 Update account_wrap.cpp
Use ````snprintf```` instead of ````sprintf````
2015-02-09 08:26:41 -08:00
xboi209
f2a7d0b2ea Update watch.cpp
Use ````snprintf```` instead of ````sprintf````
2015-02-09 07:49:50 -08:00
xboi209
dc80998cc3 Update xstring.cpp
Use xmalloc
2015-02-08 08:28:30 -08:00
xboi209
df4e082f93 Update strdup.cpp
Use xmalloc
2015-02-08 08:25:50 -08:00
xboi209
5122177a00 Update d2dbs_winmain.cpp
Close va_list with va_end
2015-02-08 08:14:43 -08:00
xboi209
66768a796b Update d2cs_winmain.cpp
Close va_list with va_end
2015-02-08 08:14:42 -08:00
xboi209
fcf7256b03 Merge pull request #5 from HarpyWar/master
sync
2015-02-08 08:03:50 -08:00
HarpyWar
9375de8283 force lock account with illegal username when log on (fix for previous commit, restriction was when create account) 2015-02-02 13:22:12 +03:00
HarpyWar
8af97e7ad8 do not allow register account named with one of the reserved filenames in Windows https://msdn.microsoft.com/en-us/library/aa365247.aspx#naming_conventions 2015-02-01 21:42:56 +03:00
xboi209
5e8dfbd977 Merge pull request #4 from HarpyWar/master
Sync
2015-01-29 08:08:16 -08:00
HarpyWar
4c36a6ad25 Merge pull request #123 from aancw/bugIconSwithHack
Fix User DC when click Tournament Icon & Set user to Default Icon when I...
2015-01-27 21:38:13 +03:00
aancw
7397168f01 [CLEAN] Fix User DC when click Tournament Icon & Set user to Default Icon when ICON SWITCH HACK 2015-01-23 11:23:14 +07:00
aancw
efa98d3885 Fix User DC when click Tournament Icon & Set user to Default Icon when ICON SWITCH HACK
Signed-off-by: aancw <cacaddv@gmail.com>
2014-12-22 17:48:11 +07:00
HarpyWar
10c542a784 fix send "png" banner files https://github.com/HarpyWar/pvpgn/issues/120 2014-11-10 22:33:27 +03:00
HarpyWar
954dcd131a continue to previous commit 2014-11-08 10:57:11 +03:00
HarpyWar
451718a6b8 refactoring and fix code warnings from PVS Studio 2014-11-07 20:26:57 +03:00
HarpyWar
1bcf7879d4 fix possible memory leak, because key_get_tab return xstrdup (?) 2014-11-06 14:18:30 +03:00
HarpyWar
cf388ca0a4 cleanup code 2014-11-06 10:07:10 +03:00
HarpyWar
7878a6fec3 fix next_id assignment when loading ad.conf https://github.com/HarpyWar/pvpgn/issues/115 2014-11-05 11:52:46 +03:00
HarpyWar
eb7e80d35d fix russian encoding (in addition to https://github.com/HarpyWar/pvpgn/pull/117) 2014-11-05 11:51:28 +03:00
HarpyWar
8d9b37b9d5 Merge pull request #117 from iltmpz/master
fix encoding for W2BN, should be cp1251 instead of UTF-8
2014-11-05 11:48:22 +03:00
HarpyWar
3b3c385b02 Update CMakeLists.txt https://github.com/HarpyWar/pvpgn/issues/115 2014-11-04 20:46:39 +03:00
HarpyWar
16d8cc2d6b fix compile error in Linux https://travis-ci.org/HarpyWar/pvpgn/builds/39961428 https://github.com/HarpyWar/pvpgn/issues/115 2014-11-04 19:49:46 +03:00
HarpyWar
0825dd6c18 update banner configuration https://github.com/HarpyWar/pvpgn/issues/115 2014-11-04 19:32:14 +03:00
iltmpz
fac1e9328d fix encoding for W2BN, should be cp1251 instead of UTF-8 2014-11-03 15:53:42 +03:00
HarpyWar
91204db81a Update FindMySQL.cmake https://github.com/HarpyWar/pvpgn/issues/116
(fix for the commit  8b17eefadf)
2014-11-02 22:31:52 +03:00
HarpyWar
c2f5732611 more flexibly grant permissions for user groups who can manage icons of other users 2014-11-02 21:32:20 +03:00
HarpyWar
f3c2efdebd fix crash when fetching Ladder using MirageBot https://github.com/HarpyWar/pvpgn/issues/107 2014-11-02 14:40:14 +03:00
HarpyWar
44e5267940 Merge branch 'master' of https://github.com/harpywar/pvpgn 2014-11-01 13:12:12 +03:00
HarpyWar
8b17eefadf Update FindMySQL.cmake with the actual directory paths (source https://gist.github.com/RenatoUtsch/1623340) 2014-11-01 13:11:54 +03:00
HarpyWar
129ce9ba39 Merge pull request #58 from AleXoundOS/patch-1
little changes for ruRU translations
2014-10-29 14:21:20 +03:00
HarpyWar
3af4f2a7e1 fix displaying channel topic text (length was cut) 2014-10-29 11:57:51 +03:00
HarpyWar
8b3ed987ec fix mysql column names for mute/lock https://github.com/HarpyWar/pvpgn/issues/111
https://github.com/HarpyWar/pvpgn/issues/85
2014-10-28 18:58:20 +03:00
HarpyWar
dd71f21784 fix lock/mute text formatting https://github.com/HarpyWar/pvpgn/issues/108 2014-10-28 18:50:55 +03:00
HarpyWar
23f03d6060 flash attribute for online users if FORCE flag is passed https://github.com/HarpyWar/pvpgn/issues/110
https://github.com/HarpyWar/pvpgn/issues/85
2014-10-28 18:20:05 +03:00
HarpyWar
93c385ff2b oops, forgot set length https://github.com/HarpyWar/pvpgn/issues/72 2014-10-28 13:52:51 +03:00
HarpyWar
ab60ca6506 fix ExtraWork data handling https://github.com/HarpyWar/pvpgn/issues/72 2014-10-28 13:21:55 +03:00
HarpyWar
1fe87515ab there is _DEBUG flag for debug mode 2014-10-26 00:30:46 +04:00
HarpyWar
245c871d44 fix compile on Freebsd 10 http://forums.harpywar.com/viewtopic.php?id=1235 2014-10-26 00:17:09 +04:00
HarpyWar
e9d63f2678 generate a crash dump file on Windows https://github.com/HarpyWar/pvpgn/wiki/Debugging-Segment-Faults-(crash-dump) 2014-10-26 00:15:08 +04:00
HarpyWar
c75cbc5c63 Merge pull request #97 from GeckoVOD/master
German translation
2014-10-25 16:10:48 +04:00
xboi209
a13a545725 Update common.xml 2014-09-28 16:22:47 -07:00
xboi209
80a832a2fd Update common.xml 2014-09-25 19:33:41 -07:00
Celetuiw
9450bf8290 Update w3motd.txt 2014-09-25 21:48:10 +02:00
Celetuiw
8480f814fa Update newaccount.txt 2014-09-25 21:47:32 +02:00
Celetuiw
9ffaedef17 Update termsofservice.txt 2014-09-25 21:46:48 +02:00
Celetuiw
87b236a57e Update newaccount.txt 2014-09-25 21:43:14 +02:00
Celetuiw
62978dd7d8 Update common.xml 2014-09-25 21:39:49 +02:00
Celetuiw
c25a1dab67 Update chathelp-war3.txt 2014-09-25 20:28:53 +02:00
Celetuiw
f0f136ae02 Update bnmotd.txt 2014-09-25 20:28:12 +02:00
Celetuiw
470b7fa9d0 Update bnhelp.conf 2014-09-25 20:27:35 +02:00
HarpyWar
6c50351e27 log all sql queries in trace level https://github.com/HarpyWar/pvpgn/issues/85 2014-09-13 22:18:47 +04:00
HarpyWar
bb54fecd39 Do not set dirty flag on just loaded attributes, and due to this do not clear dirty flags after each load https://github.com/HarpyWar/pvpgn/issues/85 https://github.com/HarpyWar/pvpgn/issues/99
It saves the same functionality, but now it fixes bug when loading a next sql table into a memory (not we load a whole table on demand) - it clear dirty flags on previous modified attributes that were not saved yet.
2014-09-13 17:58:19 +04:00
HarpyWar
5f171df203 move Quiz records file into /var/quiz_records.txt 2014-09-13 12:42:50 +04:00
HarpyWar
0c6738fe89 fix implementation for ghost commands, now it mostly tested and work https://github.com/HarpyWar/pvpgn/issues/35 2014-09-13 12:27:25 +04:00
HarpyWar
9b2e7fda4e * allow send whisper message from the server in Lua
* fix attribute return types in Lua
2014-09-12 23:13:21 +04:00
HarpyWar
1f1076c8ae login handlers for Lua 2014-09-12 23:12:07 +04:00
HarpyWar
e1eb3623f5 fix crash when saving gamelist to status file https://github.com/HarpyWar/pvpgn/pull/80#issuecomment-55013934 2014-09-10 14:16:46 +04:00
Celetuiw
f190b8ad8c Update termsofservice.txt 2014-09-09 19:29:00 +02:00
Celetuiw
93a98acafc Update newaccount.txt 2014-09-09 19:28:53 +02:00
Celetuiw
a9f5eaa1fe Update newaccount.txt 2014-09-09 19:19:56 +02:00
Celetuiw
a03d8d5eec Update w3motd.txt 2014-09-07 02:36:37 +02:00
Celetuiw
0033abc78a Update chathelp-war3.txt 2014-09-07 02:34:18 +02:00
Celetuiw
cbb50cc6d4 Update bnmotd.txt 2014-09-07 02:27:56 +02:00
Celetuiw
aab2863a95 Update bnhelp.conf 2014-09-07 02:26:25 +02:00
Celetuiw
b820892ad7 Update bnhelp.conf 2014-09-07 02:08:05 +02:00
Celetuiw
2055b028de Update bnhelp.conf 2014-09-07 02:01:24 +02:00
Celetuiw
d714272723 Update bnhelp.conf 2014-09-06 21:54:38 +02:00
Celetuiw
4a742f53b7 Update bnhelp.conf 2014-09-05 21:43:36 +02:00
Celetuiw
6f1e8d11e2 Update bnhelp.conf 2014-09-05 21:05:11 +02:00
HarpyWar
a7ea686415 Remove .gitattributes https://github.com/HarpyWar/pvpgn/issues/86 2014-09-03 20:16:07 +04:00
root
efde8d7cb4 go 2014-09-03 11:26:57 -04:00
HarpyWar
c75095f888 Update README.md 2014-09-01 21:19:14 +04:00
HarpyWar
72fe92d673 Update README.md 2014-09-01 21:18:23 +04:00
xboi209
d577663b24 Update termsofservice.txt 2014-07-25 00:01:06 -07:00
xboi209
669c8380c8 Merge pull request #3 from HarpyWar/master
Sync with Harpywar
2014-07-24 12:18:27 -07:00
xboi209
76214a86c9 Merge pull request #2 from HarpyWar/master
Sync with Harpywar
2014-07-17 16:47:59 -07:00
xboi209
a880c8855f Update common.xml 2014-07-15 22:02:56 -07:00
xboi209
e4ced26bde Update common.xml 2014-07-15 22:01:45 -07:00
xboi209
2687585099 Update common.xml
a3c629afb2
2014-07-15 21:57:40 -07:00
Celetuiw
a3c629afb2 Update common.xml 2014-07-15 13:58:21 +02:00
Celetuiw
7a1d947495 Update common.xml 2014-07-15 13:55:53 +02:00
xboi209
a839c6c761 Update common.xml 2014-07-14 10:32:06 -07:00
xboi209
eb3155768a Update common.xml 2014-07-14 10:30:59 -07:00
xboi209
57137cb6fa Create w3motd.txt 2014-07-14 10:15:13 -07:00
xboi209
1201654296 Create termsofservice.txt 2014-07-14 10:15:01 -07:00
xboi209
7f4e00dcbb Create newaccount.txt 2014-07-14 10:14:44 -07:00
xboi209
f63627e336 Create chathelp-war3.txt 2014-07-14 10:14:35 -07:00
xboi209
c5decc0cd7 Create bnhelp.conf 2014-07-14 10:13:59 -07:00
xboi209
598ceaa0ff Create common.xml 2014-07-14 10:13:30 -07:00
AleXoundOS
687a143e79 Update chathelp-war3.txt 2014-07-13 23:53:13 +04:00
AleXoundOS
eec258be3a Update bnmotd.txt 2014-07-13 23:52:15 +04:00
AleXoundOS
4edebfc9dd Update chathelp-war3.txt 2014-07-13 23:39:11 +04:00
xboi209
a1ca1e273d Merge pull request #1 from HarpyWar/master
Sync with Harpywar
2014-07-13 00:28:41 -07:00
386 changed files with 40640 additions and 24015 deletions

1
.gitattributes vendored
View file

@ -1 +0,0 @@
termsofservice.txt eol=crlf

69
.github/workflows/codeql-analysis.yml vendored Normal file
View file

@ -0,0 +1,69 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"
on:
push:
branches: [ "master", "develop" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master", "develop" ]
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['cpp']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

10
.gitignore vendored Normal file
View file

@ -0,0 +1,10 @@
################################################################################
# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
################################################################################
/zlib
/cmake/Modules
/build
/lua5.1
/.vs
/CMakeSettings.json

View file

@ -1,20 +1,32 @@
os: linux
dist: focal
arch: amd64
language: cpp
compiler:
- gcc
branches:
only:
- master
- develop
language: cpp
os:
- linux
before_install:
- sudo apt-get update --fix-missing
- sudo apt-get install build-essential zlib1g-dev libmysqlclient-dev liblua5.1-0-dev
addons:
apt:
packages:
- zlib1g-dev
- build-essential
- libmysqlclient-dev
- liblua5.1-0-dev
before_script:
- mkdir build
- cd build
script:
- cmake -D WITH_MYSQL=true -D WITH_LUA=true ../
script:
- make
after_script:
- sudo make install
- sudo make uninstall

34
BUGS
View file

@ -1,34 +0,0 @@
You think you have found a bug ? Good, now read the list below and check if
its already known. If you dont find it in the list then follow the bug report
instructions.
Known Bugs:
- tournament support has only first round and it doesnt show the map after
25 minutes nor it stops the game after 30 minutes
- there are some reported issues with PG/quickgame (network errors plus people
getting lost game results when they shouldnt be, unfortunetly we havent been
able to reproduce those)
Bug report instructions:
- first read this webpage and only after you have read it come back:
http://www.chiark.greenend.org.uk/~sgtatham/bugs.html
- logon to forums.pvpgn.org (create an account if necesarry)
- search the support forums (official support or open tech support) if your
problem was already reported, if it was reported then just add some comments
to the already opened forum thread if you feel its necesary
- if you got a new/unknown problem, open a new thread in the open tech support
forum
- give a usefull title to the thread, not like "it doesnt work" or "pvpgn sucks"
couse this messages will just get ignored; you need to describe your problem in
the tile in few words like "client disconnects in profile view" or "players get
loss in playgame disconnects" or something like that
- in the body of the post start with first saying which pvpgn version, on which
OS (operating system) you run pvpgn, configure command line you used if you
compiled your source on Unix/Linux
- after that describe in detail your problem; what exactly did you tried to do,
what did you expected from PvPGN and what happened wrong; also try before
reporting the problem to find a way to reproduce the problem, that is to find
the steps which if someone from the PvPGN team will do then they will get the
problem too, and describe exactly the reproduction steps
- thank you for the bug report!

View file

@ -1,9 +1,5 @@
# Required cmake version
cmake_minimum_required(VERSION 2.4.3)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
cmake_minimum_required(VERSION 3.1.0)
# Put the include dirs which are in the source or build tree
# before all other include dirs, so the headers in the sources
@ -11,57 +7,85 @@ endif(COMMAND cmake_policy)
# since cmake 2.4.1
set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
project(pvpgn)
project(pvpgn CXX)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
option(WITH_BNETD "compile the bnetd target" ON)
option(WITH_D2CS "compile the d2cs target" ON)
option(WITH_D2DBS "compile the d2dbs target" ON)
option(WITH_ANSI "enforce strict ISO C++ conforming" ON)
if(WIN32)
option(WITH_WIN32_GUI "enable GUI building (default on)" ON)
endif(WIN32)
option(WITH_LUA "enable Lua support" OFF)
if(WIN32)
option(WITH_WIN32_GUI "enable GUI building (default on)" ON)
endif(WIN32)
#storage backends flags
option(WITH_MYSQL "include MySQL user accounts support" OFF)
option(WITH_SQLITE3 "include SQLite3 user accounts support" OFF)
option(WITH_PGSQL "include PostgreSQL user accounts support" OFF)
option(WITH_ODBC "include ODBC user accounts support" OFF)
include(ConfigureChecks.cmake)
if (CMAKE_COMPILER_IS_GNUCXX)
# Determine GCC version.
message("Determining GCC version.")
EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
ARGS --version
OUTPUT_VARIABLE _GCC_VERSION)
STRING(REGEX REPLACE ".* ([0-9])\\.([0-9])\\.([0-9]) .*" "\\1\\2\\3"
_GCC_VERSION ${_GCC_VERSION})
message(" GCC version is ${_GCC_VERSION}")
# Add -Wno-longlong if the GCC version is < 4.0.0. Add -pedantic flag
# but disable warnings for variadic macros with GCC >= 4.0.0. Earlier
# versions warn because of anonymous variadic macros in pedantic mode
# but do not have a flag to disable these warnings.
if (400 GREATER _GCC_VERSION)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-long-long")
else (400 GREATER _GCC_VERSION)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wno-variadic-macros")
endif (400 GREATER _GCC_VERSION)
# Pass CXX flags to flags.
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSEQAN_CXX_FLAGS_=\"${CMAKE_CXX_FLAGS}\"")
endif (CMAKE_COMPILER_IS_GNUCXX)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# using Clang
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-idiomatic-parentheses -pedantic")
subdirs(src conf man files)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
# using G++
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1)
message(FATAL_ERROR "G++ 5.1 or higher required")
endif()
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wno-variadic-macros" )
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# using Visual Studio
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.0)
message(FATAL_ERROR "Visual Studio 2015 or higher required")
endif()
add_definitions(
-D_CRT_SECURE_NO_DEPRECATE
-D_CRT_NONSTDC_NO_DEPRECATE
-DUNICODE
-D_UNICODE
)
# DEBUG compiler flags:
# /Zi create debugging information PDB file
# /Od disable optimizations
# /Oy- do not suppress frame pointers (recommended for debugging)
# /MTd use statically linked, thread-safe, debug CRT libs (Magic Builder set this flag when build)
#
# RELEASE compiler flags:
# /MT use statically linked, thread-safe CRT libs (Magic Builder set this flag when build)
# /GS- no Buffer Security Check
#
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Zi /Od /Oy-")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
# Explaining of linker flags and why enable pdb with debug info for Release build is on:
# https://www.wintellect.com/correctly-creating-native-c-release-build-pdbs
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF")
endif()
add_subdirectory(conf)
add_subdirectory(files)
add_subdirectory(lib/fmt)
add_subdirectory(man)
add_subdirectory(src)
if(WITH_LUA)
add_subdirectory(lua)
endif(WITH_LUA)
ENABLE_TESTING()
enable_testing()
# uninstall target
configure_file(

View file

@ -1,20 +1,14 @@
# put in this file everything that needs to be setup depending
# on the target architecture
# our own modules
set(CMAKE_MODULE_PATH
${CMAKE_SOURCE_DIR}/cmake/Modules
)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
# include used modules
include(DefineInstallationPaths)
include(CheckIncludeFileCXX)
include(CheckIncludeFilesCXX)
include(CheckFunctionExists)
include(CheckSymbolExists)
include(CheckLibraryExists)
include(CheckTypeSizeCXX)
include(CheckCXXCompilerFlag)
include(CheckMkdirArgs)
include(CheckIncludeFiles)
# setup short variable path names
set(BINDIR ${BIN_INSTALL_DIR})
@ -35,12 +29,9 @@ else(WIN32)
endif(WIN32)
# library checks
find_package(ZLIB REQUIRED)
check_library_exists(pcap pcap_open_offline "" HAVE_LIBPCAP)
check_library_exists(nsl gethostbyname "" HAVE_LIBNSL)
check_library_exists(socket socket "" HAVE_LIBSOCKET)
check_library_exists(resolv inet_aton "" HAVE_LIBRESOLV)
check_library_exists(bind __inet_aton "" HAVE_LIBBIND)
if(WITH_BNETD)
find_package(ZLIB REQUIRED)
endif(WITH_BNETD)
if(WITH_LUA)
find_package(Lua REQUIRED)
@ -52,9 +43,6 @@ if(WITH_ODBC)
endif(WITH_ODBC)
if(WITH_MYSQL)
find_package(MySQL REQUIRED)
# disable strict ANSI checking when using MySQL headers
# which contain invalid "long long" type
set(WITH_ANSI OFF)
endif(WITH_MYSQL)
if(WITH_SQLITE3)
find_package(SQLite3 REQUIRED)
@ -63,8 +51,12 @@ if(WITH_PGSQL)
find_package(PostgreSQL REQUIRED)
endif(WITH_PGSQL)
# if any of nsl or socket exists we need to make sure the following tests
# use them otherwise some functions may not be found
check_library_exists(nsl gethostbyname "" HAVE_LIBNSL)
check_library_exists(socket socket "" HAVE_LIBSOCKET)
check_library_exists(resolv inet_aton "" HAVE_LIBRESOLV)
check_library_exists(bind __inet_aton "" HAVE_LIBBIND)
if(HAVE_LIBNSL)
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} nsl)
SET(NETWORK_LIBRARIES ${NETWORK_LIBRARIES} nsl)
@ -83,123 +75,103 @@ if(HAVE_LIBBIND)
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} bind)
SET(NETWORK_LIBRARIES ${NETWORK_LIBRARIES} bind)
endif(HAVE_LIBBIND)
# for win32 unconditionally add network library linking to "ws2_32"
if(WIN32)
SET(NETWORK_LIBRARIES ${NETWORK_LIBRARIES} ws2_32)
endif(WIN32)
check_include_files_cxx("cassert;cctype;cerrno;cmath;climits;csignal;cstdarg;cstddef;cstdio;cstdlib;cstring;ctime;deque;exception;fstream;iomanip;iostream;limits;list;map;memory;sstream;stdexcept;string;utility;vector" HAVE_STD_HEADERS)
if(NOT HAVE_STD_HEADERS)
MESSAGE(FATAL_ERROR "Standard C90/C++98 header missing, you need a fully standard compliant compiler/enviroment.")
endif(NOT HAVE_STD_HEADERS)
check_include_file_cxx(fcntl.h HAVE_FCNTL_H)
check_include_file_cxx(sys/time.h HAVE_SYS_TIME_H)
check_include_file_cxx(sys/select.h HAVE_SYS_SELECT_H)
check_include_file_cxx(unistd.h HAVE_UNISTD_H)
check_include_file_cxx(sys/utsname.h HAVE_SYS_UTSNAME_H)
check_include_file_cxx(sys/timeb.h HAVE_SYS_TIMEB_H)
check_include_file_cxx(sys/socket.h HAVE_SYS_SOCKET_H)
check_include_file_cxx(sys/param.h HAVE_SYS_PARAM_H)
check_include_file_cxx(netinet/in.h HAVE_NETINET_IN_H)
message(STATUS "Checking POSIX headers")
check_include_file_cxx(arpa/inet.h HAVE_ARPA_INET_H)
check_include_file_cxx(netdb.h HAVE_NETDB_H)
check_include_file_cxx(termios.h HAVE_TERMIOS_H)
check_include_file_cxx(sys/types.h HAVE_SYS_TYPES_H)
check_include_file_cxx(sys/wait.h HAVE_SYS_WAIT_H)
check_include_file_cxx(sys/ioctl.h HAVE_SYS_IOCTL_H)
check_include_file_cxx(stdint.h HAVE_STDINT_H)
check_include_file_cxx(sys/file.h HAVE_SYS_FILE_H)
check_include_file_cxx(poll.h HAVE_POLL_H)
check_include_file_cxx(sys/poll.h HAVE_SYS_POLL_H)
check_include_file_cxx(sys/stropts.h HAVE_SYS_STROPTS_H)
check_include_file_cxx(sys/stat.h HAVE_SYS_STAT_H)
check_include_file_cxx(pwd.h HAVE_PWD_H)
check_include_file_cxx(grp.h HAVE_GRP_H)
check_include_file_cxx(dir.h HAVE_DIR_H)
check_include_file_cxx(dirent.h HAVE_DIRENT_H)
check_include_file_cxx(ndir.h HAVE_NDIR_H)
check_include_file_cxx(sys/ndir.h HAVE_SYS_NDIR_H)
check_include_file_cxx(sys/dir.h HAVE_SYS_DIR_H)
check_include_file_cxx(direct.h HAVE_DIRECT_H)
check_include_file_cxx(grp.h HAVE_GRP_H)
check_include_file_cxx(fcntl.h HAVE_FCNTL_H)
check_include_file_cxx(netdb.h HAVE_NETDB_H)
check_include_file_cxx(netinet/in.h HAVE_NETINET_IN_H)
check_include_file_cxx(poll.h HAVE_POLL_H)
check_include_file_cxx(pwd.h HAVE_PWD_H)
check_include_file_cxx(sys/mman.h HAVE_SYS_MMAN_H)
check_include_files_cxx("sys/types.h;sys/event.h" HAVE_SYS_EVENT_H)
check_include_file_cxx(sys/epoll.h HAVE_SYS_EPOLL_H)
check_include_file_cxx(sys/resource.h HAVE_SYS_RESOURCE_H)
check_include_file_cxx(pcap.h HAVE_PCAP_H)
check_include_file_cxx(sys/select.h HAVE_SYS_SELECT_H)
check_include_file_cxx(sys/socket.h HAVE_SYS_SOCKET_H)
check_include_file_cxx(sys/stat.h HAVE_SYS_STAT_H)
check_include_file_cxx(sys/time.h HAVE_SYS_TIME_H)
check_include_file_cxx(sys/types.h HAVE_SYS_TYPES_H)
check_include_file_cxx(sys/utsname.h HAVE_SYS_UTSNAME_H)
check_include_file_cxx(sys/wait.h HAVE_SYS_WAIT_H)
check_include_file_cxx(termios.h HAVE_TERMIOS_H)
check_include_file_cxx(unistd.h HAVE_UNISTD_H)
message(STATUS "Checking optional POSIX/required SUS headers")
check_include_file_cxx(sys/timeb.h HAVE_SYS_TIMEB_H)
message(STATUS "Checking FreeBSD-based headers")
check_include_file_cxx(sys/event.h HAVE_SYS_EVENT_H)
check_include_file_cxx(sys/param.h HAVE_SYS_PARAM_H)
message(STATUS "Checking BSD headers")
check_include_file_cxx(sys/file.h HAVE_SYS_FILE_H)
message(STATUS "Checking Linux headers")
check_include_file_cxx(sys/epoll.h HAVE_SYS_EPOLL_H)
message(STATUS "Checking Win32 headers")
check_include_file_cxx(windows.h HAVE_WINDOWS_H)
check_include_file_cxx(winsock2.h HAVE_WINSOCK2_H)
check_include_file_cxx(ws2tcpip.h HAVE_WS2TCPIP_H)
check_include_file_cxx(process.h HAVE_PROCESS_H)
check_type_size_cxx("unsigned char" SIZEOF_UNSIGNED_CHAR)
check_type_size_cxx("unsigned short" SIZEOF_UNSIGNED_SHORT)
check_type_size_cxx("unsigned int" SIZEOF_UNSIGNED_INT)
check_type_size_cxx("unsigned long" SIZEOF_UNSIGNED_LONG)
check_type_size_cxx("unsigned long long" SIZEOF_UNSIGNED_LONG_LONG)
check_type_size_cxx("signed char" SIZEOF_SIGNED_CHAR)
check_type_size_cxx("signed short" SIZEOF_SIGNED_SHORT)
check_type_size_cxx("signed int" SIZEOF_SIGNED_INT)
check_type_size_cxx("signed long" SIZEOF_SIGNED_LONG)
check_type_size_cxx("signed long long" SIZEOF_SIGNED_LONG_LONG)
message(STATUS "Checking other headers")
check_include_file_cxx(dir.h HAVE_DIR_H)
check_include_file_cxx(direct.h HAVE_DIRECT_H)
check_include_file_cxx(ndir.h HAVE_NDIR_H)
check_include_file_cxx(sys/dir.h HAVE_SYS_DIR_H)
check_include_file_cxx(sys/ndir.h HAVE_SYS_NDIR_H)
check_include_file_cxx(sys/poll.h HAVE_SYS_POLL_H)
check_function_exists(mmap HAVE_MMAP)
check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
check_function_exists(strdup HAVE_STRDUP)
check_function_exists(strtoul HAVE_STRTOUL)
check_function_exists(uname HAVE_UNAME)
check_function_exists(uname HAVE_UNAME)
check_function_exists(fork HAVE_FORK)
check_function_exists(getpid HAVE_GETPID)
check_function_exists(sigaction HAVE_SIGACTION)
check_function_exists(sigprocmask HAVE_SIGPROCMASK)
check_function_exists(sigaddset HAVE_SIGADDSET)
check_function_exists(setpgid HAVE_SETPGID)
check_function_exists(ftime HAVE_FTIME)
check_function_exists(strcasecmp HAVE_STRCASECMP)
check_function_exists(strncasecmp HAVE_STRNCASECMP)
check_function_exists(stricmp HAVE_STRICMP)
check_function_exists(strnicmp HAVE_STRNICMP)
check_function_exists(chdir HAVE_CHDIR)
check_function_exists(difftime HAVE_DIFFTIME)
check_function_exists(strchr HAVE_STRCHR)
check_function_exists(strrchr HAVE_STRRCHR)
check_function_exists(index HAVE_INDEX)
check_function_exists(rindex HAVE_RINDEX)
check_function_exists(epoll_create HAVE_EPOLL_CREATE)
check_function_exists(fork HAVE_FORK)
check_function_exists(ftime HAVE_FTIME)
check_function_exists(getgid HAVE_GETGID)
check_function_exists(getgrnam HAVE_GETGRNAM)
check_function_exists(getlogin HAVE_GETLOGIN)
check_function_exists(getopt HAVE_GETOPT)
check_function_exists(getpid HAVE_GETPID)
check_function_exists(getpwnam HAVE_GETPWNAME)
check_function_exists(getrlimit HAVE_GETRLIMIT)
check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
check_function_exists(getuid HAVE_GETUID)
check_function_exists(ioctl HAVE_IOCTL)
check_function_exists(kqueue HAVE_KQUEUE)
check_function_exists(_mkdir HAVE__MKDIR)
check_function_exists(mkdir HAVE_MKDIR)
check_function_exists(mmap HAVE_MMAP)
check_function_exists(pipe HAVE_PIPE)
check_function_exists(poll HAVE_POLL)
check_function_exists(setitimer HAVE_SETITIMER)
check_function_exists(setpgid HAVE_SETPGID)
check_function_exists(setpgrp HAVE_SETPGRP)
check_function_exists(setsid HAVE_SETSID)
check_function_exists(setuid HAVE_SETUID)
check_function_exists(sigaction HAVE_SIGACTION)
check_function_exists(sigaddset HAVE_SIGADDSET)
check_function_exists(sigprocmask HAVE_SIGPROCMASK)
check_function_exists(strcasecmp HAVE_STRCASECMP)
check_function_exists(strdup HAVE_STRDUP)
check_function_exists(stricmp HAVE_STRICMP)
check_function_exists(strncasecmp HAVE_STRNCASECMP)
check_function_exists(strnicmp HAVE_STRNICMP)
check_function_exists(strsep HAVE_STRSEP)
check_function_exists(uname HAVE_UNAME)
check_function_exists(wait HAVE_WAIT)
check_function_exists(waitpid HAVE_WAITPID)
check_function_exists(pipe HAVE_PIPE)
check_function_exists(getenv HAVE_GETENV)
check_function_exists(ioctl HAVE_IOCTL)
check_function_exists(setsid HAVE_SETSID)
check_function_exists(poll HAVE_POLL)
check_function_exists(getlogin HAVE_GETLOGIN)
check_function_exists(getpwnam HAVE_GETPWNAME)
check_function_exists(getgrnam HAVE_GETGRNAM)
check_function_exists(getuid HAVE_GETUID)
check_function_exists(getgid HAVE_GETGID)
check_function_exists(setuid HAVE_SETUID)
check_function_exists(mkdir HAVE_MKDIR)
check_function_exists(_mkdir HAVE__MKDIR)
check_function_exists(strsep HAVE_STRSEP)
check_function_exists(getopt HAVE_GETOPT)
check_function_exists(kqueue HAVE_KQUEUE)
check_function_exists(setitimer HAVE_SETITIMER)
check_function_exists(epoll_create HAVE_EPOLL_CREATE)
check_function_exists(getrlimit HAVE_GETRLIMIT)
check_function_exists(vsnprintf HAVE_VSNPRINTF)
check_function_exists(_vsnprintf HAVE__VSNPRINTF)
check_function_exists(snprintf HAVE_SNPRINTF)
check_function_exists(_snprintf HAVE__SNPRINTF)
check_function_exists(setpgrp HAVE_SETPGRP)
check_function_exists(inet_aton HAVE_INET_ATON)
# winsock2.h and ws2_32 should provide these
if(HAVE_WINSOCK2_H)
set(HAVE_GETHOSTNAME ON)
set(HAVE_SELECT ON)
set(HAVE_SOCKET ON)
set(HAVE_INET_NTOA ON)
set(HAVE_RECV ON)
set(HAVE_SEND ON)
set(HAVE_RECVFROM ON)
@ -210,7 +182,6 @@ else(HAVE_WINSOCK2_H)
check_function_exists(gethostname HAVE_GETHOSTNAME)
check_function_exists(select HAVE_SELECT)
check_function_exists(socket HAVE_SOCKET)
check_function_exists(inet_ntoa HAVE_INET_NTOA)
check_function_exists(recv HAVE_RECV)
check_function_exists(send HAVE_SEND)
check_function_exists(recvfrom HAVE_RECVFROM)
@ -221,21 +192,4 @@ endif(HAVE_WINSOCK2_H)
check_mkdir_args(MKDIR_TAKES_ONE_ARG)
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
#check_cxx_compiler_flag("-Wall" WITH_FLAG_WALL)
if(WITH_ANSI)
# on MINGW non-standard library features are conditioned on __STRICT_ANSI__ not being defined
# (which is stupid since a program using specific system functions can still be standard
# conformant, -ansi doesn't mean to not use non ANSI features it just means to respect
# the standard text)
if(NOT MINGW AND NOT MSVC)
check_cxx_compiler_flag("-pedantic -ansi" WITH_FLAG_ANSIPEDANTIC)
endif(NOT MINGW AND NOT MSVC)
endif(WITH_ANSI)
# new VS.Net deprecates with warnings most of ISO C functions without this
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
endif(MSVC)
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)

View file

@ -1,71 +0,0 @@
NOTE: we believe that most people are more likely to read IGNOREME file than
the README file so we moved the actual contents of README into this file. We
hope that this will improve the quality of questions on support channels.
>>>>> IMPORTANT: THIS IS A BETA QUALITY RELEASE <<<<<<
Readme for Player vs. Player Gaming Network
---------------------------------------------
PvPGN is a BNETD mod which aims to provide support for all Blizzard
clients (thus it supports all BNETD supported clients plus the most recent
ones).
The list of supported clients and their minimum verion required is:
Battle.net games:
------------------------
- Diablo 1 v1.09
- Starcraft v1.08
- BroodWar v1.08
- Warcraft II Battle.Net Edition v2.02
- Diablo 2 v1.10
- Diablo 2 LOD v1.10
- Warcraft III Reign Of Chaos v1.13
- Warcraft III Frozen Throne v1.13
Westwood Online games:
----------------------
- Westwood Chat client v4.221
- Command & Conquer Win95 v1.04a (under the Westwood Chat)
- Red Alert Win95 v2.00 (under the Westwood Chat)
- Red Alert Win95 v3.03
- Dune 2000 v1.06
- Tiberian Sun v2.03 ST-10
- Tiberian Sun Firestorm v2.03 ST-10
- Red Alert 2 v1.006
- Yuri's Revenge v1.001
- Nox v1.02b
- Nox Quest v1.02b
- Emperor: Battle for Dune v1.09
- Renegade v1.037
- Lands of Lore 3 (autoupdate only)
-----
The documentation is located in the docs directory. Please read docs/INDEX
for a list of files and what they contain.
If you are updating from a previous PvPGN version check the file UPDATE
first.
-----
We're always looking for coders (C++ coders) or
anyone who can contribute to our project in any way.
Project homepages/distribution sites:
- project home and main distribution site: http://pvpgn.berlios.de
- alternate project home: http://www.pvpgn.org
Support channels:
1. BugTracker (preffered support method):
http://developer.berlios.de/bugs/?group_id=2291
2. Mailing List: pvpgn-users@lists.berlios.de ( to subscribe go here
https://lists.berlios.de/mailman/listinfo/pvpgn-users )
3. Forums: http://forums.pvpgn.org
4. IRC live support: #pvpgn on irc.pvpgn.org

View file

View file

@ -1,7 +0,0 @@
ALPHA releases ONLY README
This release is only intended for profesionals and PvPGN team members. This
release has not beeing had any testing (it may not even compile). You are on
your own with this release.

View file

@ -339,6 +339,11 @@ valgrind cannot find (yes, valgrind is superb but there is a class of bugs,
especially overflows which valgrind can't help you with) you should then try
the next debugging tool.
2. Deleaker (http://deleaker.com)
For developers on Windows and uses Visual Studio, Deleaker is an extension for Visual Studio that helps you detect and localize resource leaks in memory, GDI and USER objects, handles. It integrates into Visual Studio's debugging functionality and displays useful information to trace leaks back to their source code.
Deleaker also comes with a standalone program for developers using other compilers.
Appendix C. How to generate and use "core" files
=================================================

View file

@ -1,122 +0,0 @@
PvPGN CMake Build Instructions
===================================
0. Getting "cmake"
Before anything you need to make sure you have a cmake (at least version
2.4.3) installed on the system you wish to compile PvPGN. On Linux/*BSD systems
this sould probably be provided by your package system one way or another or
you could try to build cmake from source. Follow the "Readme.txt" from cmake
sources if you are going over that path.
Another source of "cmake" may be the binary packages provided by the
cmake people on www.cmake.org. This is usually the way to get it on
Windows or exotic Unices. For BeOS you could get it from bebits.com.
Please note that "cmake" is not a build system by itself but rather a
"meta" build system. Parsing the cmake input files, cmake will generate
the build system files to use with your build system (which may be a
classic Unix style "make" or an IDE such as Visual Studio). cmake calls
the part of it that generates the project files a "generator" (and is
configurable).
1. Running "cmake"
Now that you have cmake (and also you have the pvpgn sources with the
cmake support) you should try to run cmake to generate the project files
(or makefiles, depending on your generator used with cmake). It is
recommended that you do an "out of source" build, this means you should
not try to build pvpgn inside the source directory but in a directory
specially made for building pvpgn.
Note: the instructions generally follow how to use the cmake command
line version which is more portable (available everywhere cmake is
available). For using various cmake GUIs one has to find out himself how
they work.
Create a build directory (preferably have it empty), change current
directory there, run cmake as "cmake /path/to/pvpgn-src" where
"/path/to/pvpgn-src" is obvioulsy the path to the pvpgn source
directory. This will have cmake generate the type of project files that
is default for your platform (which is "Unix Makefiles" on Unix/Linux
systems or "Visual Studio Project files" on Windows) without any
additional storage types (ie. no SQL support) and will install pvpgn on
"make install" in the default location (which is "/usr/local" for Unix
systems or "<System-Drive>:\\Program Files\\pvpgn" on Windows).
All these defaults are probably not what you wanted so cmake offers a
way to customize this by command line flags setting variables or
selecting the project files generator. Here are some useful options:
-G "Project Type" : tells cmake to use the "Project Type" project
files generator; on Unix systems this is by default "Unix Makefiles" and
on Windows "Visual Studio project files"; other useful values are
"KDevelop3", "MinGW Makefiles" or "MSYS Makefiles" (the last 2 are
obviously valid only on Windows)
-D CMAKE_INSTALL_PREFIX="/path/to" : it will tell cmake to set
accordingly values so that on "make install" it will install relative to
"/path/to"
-D WITH_MYSQL=true : it will tell cmake to check for MySQL
headers/libraries and if present prepare project files able to compile
PvPGN with MySQL
-D WITH_PGSQL=true or -D WITH_SQLITE3=true are similar to WITH_MYSQL
but for PostgreSQL/SQLite3 storage support
-D CMAKE_BUILD_TYPE=Debug : build in debug mode (to get meaningfull
stack traces)
WARNING: in between 2 cmake runs make sure you remove all build files
or at least remove the CMakeCache.txt file otherwise you may experience
strange problems.
2. Building PvPGN
After successfully running cmake you are ready to build pvpgn.
Depending on your project files generator used with cmake you do this in
various ways. Example: when using "Unix Makefiles" you should just issue
"make" and it should build your pvpgn binaries. When using some IDE
project file types such as KDevelop3 or Visual Studio you should run the
"Build" command of that IDE.
3. Installing PvPGN
Again, depending on the type of project files generator you used you
can install pvpgn to the CMAKE_INSTALL_DIR prefixed location. When using
the "Unix Makefiles" generator you can use "make install" to do so.
4. Full examples usage
4.1 Using cmake on a Unix/Linux system installing pvpgn under "~pvpgn"
with MySQL support
$ cd pvpgn-build
$ cmake -D CMAKE_INSTALL_PREFIX=/home/pvpgn -D WITH_MYSQL ../pvpgn-src
$ make
$ make install
4.2 Using cmake on a Windows (command line prompt) system with mingw32
> cd pvpgn-build
> cmake ..\pvpgn-src
> mingw32-make
> mingw32-make install
5. Problems
cmake building in PvPGN is a young feature as such many issues may
still arise. If you have problems with cmake please contact us at
pvpgn-dev@berlios.de (after you subscribe to the mailing list at
https://lists.berlios.de/mailman/listinfo/pvpgn-dev) or use the bug
tracker at http://developer.berlios.de/bugs/?group_id=2291 .
When reporting problems please provide all information such as pvpgn
version, your platform name/version, exactly what you tried to do (the
commands used) and exactly the errors you get.

205
README.md
View file

@ -1,68 +1,165 @@
[![Build Status](https://travis-ci.org/HarpyWar/pvpgn.svg?branch=master)](https://travis-ci.org/HarpyWar/pvpgn) [![Build status](https://ci.appveyor.com/api/projects/status/dqoj9lkvhfwthmn6)](https://ci.appveyor.com/project/HarpyWar/pvpgn)
Player versus Player Gaming Network
Player vs Player Gaming Network - PRO
=====
![](http://harpywar.com/images/items/pvpgn.gif)
![](http://i.imgur.com/LfI3hXo.png)
Original PvPGN 1.99 source code with tweaks.
PvPGN is a free and open source cross-platform server software that supports Battle.net and and Westwood Online game clients. PvPGN-PRO is a fork of the official PvPGN project, whose development stopped in 2011, and aims to provide continued maintenance and additional features for PvPGN.
[![License (GPL version 2)](https://img.shields.io/badge/license-GNU%20GPL%20version%202-blue.svg?style=flat-square)](http://opensource.org/licenses/GPL-2.0)
![Language (C++)](https://img.shields.io/badge/powered_by-C++-brightgreen.svg?style=flat-square)
[![Language (Lua)](https://img.shields.io/badge/powered_by-Lua-red.svg?style=flat-square)](https://lua.org)
[![Github Releases (by Release)](https://img.shields.io/github/downloads/pvpgn/pvpgn-server/1.99.7.2.1/total.svg?maxAge=2592000)]()
Source Code changes
--
* Lua scripting support (WITH_LUA cmake directive)
* Add display custom icons depends on a user rating, custom output for command `/stats`; works with Warcraft and Starcraft (see [icons.conf](https://github.com/HarpyWar/pvpgn/blob/master/conf/icons.conf.in)) <sup>commits [1](https://github.com/HarpyWar/pvpgn/commit/c11af352603e18acc52102ba8574776425248331), [2](https://github.com/HarpyWar/pvpgn/commit/368c4b9296d18a515af746b65fe69054ab6f4236), [3](https://github.com/HarpyWar/pvpgn/commit/f1a96c392055a777b48dc4d77631c5e906161e28)</sup>
* fix command send flooding <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/74f9e4faafe24699597e4be5bfda83bf255ba72e)</sup>
* fix compile error when pointer size is larger than int <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/1ea116434ce009bad4903ff72bd69bbb8987ce06)</sup>
* fix Warcraft 3 ICON SWITCH hack <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/84811bcfe875d6c42cd8271bbdae757f0b5d445b)</sup>
* fix saving sql fields with custom characters in the name <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/18713ffe35cbe9a12193e5c1f1caf5031d4c4731)</sup>
* add game id field in status.xml output <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/b989d26e1182a3ee8cf62f3ee79dfb231fd66e23)</sup>
* add game id field and user game version in status.dat output (the same as status.xml) <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/39d0b2be71c7ddd808a20f97fe6ac17078ce013f)</sup>
* welcome text for Warcraft 3 is moved from the code into a new file `bnmotd_w3.txt` ([example](http://img21.imageshack.us/img21/1808/j2py.png) with colored text is included)
<sup>[commit](https://github.com/HarpyWar/pvpgn/commit/ff8ca941cd7942bab201607fbc31382837a35617)</sup>
* Feature to use d2s character as a template for a new character in newbie.save; each character class can have it's own template <sup>[issue](https://github.com/HarpyWar/pvpgn/issues/20)</sup>
[![Compiler (Microsoft Visual C++)](https://img.shields.io/badge/compiled_with-Microsoft%20Visual%20C++-yellow.svg?style=flat-square)](https://msdn.microsoft.com/en-us/vstudio/hh386302.aspx)
[![Compiler (LLVM/Clang)](https://img.shields.io/badge/compiled_with-LLVM/Clang-lightgrey.svg?style=flat-square)](http://clang.llvm.org/)
[![Compiler (GCC)](https://img.shields.io/badge/compiled_with-GCC-yellowgreen.svg?style=flat-square)](https://gcc.gnu.org/)
New commands
--
* `/save` immediately save changes of accounts and clans from the cache to a storage (useful for testing) <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/be8d65d16f910b2090b0db9e7eb2c043b816dae7)</sup>
* `/icon <add|del|list>` icon stash implementation - each user has it's own stash with icons, admin/operator can add icon to user's stash, you can set aliases for icons in config; works with Warcraft and Starcraft <sup>commits [1](https://github.com/HarpyWar/pvpgn/commit/1ade081c6b10a3e710130b88613b71b880ba0cd7), [2](https://github.com/HarpyWar/pvpgn/commit/36deb1179bca931bd6585c2b6dbf7d8ade08bc8e)</sup>
* `/find <substr of username>` search account by part of the name - [patch #1526](http://developer.berlios.de/patch/?func=detailpatch&patch_id=1526&group_id=2291) from berlios <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/c229c6693b3dd55f02fe3a81403870044c0786b2)</sup>
* `/quiz` Trivia Quiz Game (implemented in Lua) <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/ee04fdd23dfef90f0b852a6e90df23c7f5edc08e)</sup>
[![Build Status](https://travis-ci.org/pvpgn/pvpgn-server.svg?branch=master)](https://travis-ci.org/pvpgn/pvpgn-server)
[![Build status](https://ci.appveyor.com/api/projects/status/dqoj9lkvhfwthmn6)](https://ci.appveyor.com/project/HarpyWar/pvpgn)
Modified commands
--
* `/set` exclusion to get/set a password hash and user id; feature to empty key with "null" value; more info in output of the command and examples <sup>commits [1](https://github.com/HarpyWar/pvpgn/commit/d96e1029478d92f67000761983e83ccfde2abbdf), [2](https://github.com/HarpyWar/pvpgn/commit/1ade081c6b10a3e710130b88613b71b880ba0cd7#diff-ef576b6b7e90128c3718523eaaf1b894R4716)</sup>
* `/finger` more info in the command output - [patch #2859](http://developer.berlios.de/patch/?func=detailpatch&patch_id=2859&group_id=2291) from berlios <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/bdb450084704da1f33e28c9edd3d2d16b720a946)</sup>
* `/games lobby` show games in lobby only - [patch #3235](http://developer.berlios.de/patch/?func=detailpatch&patch_id=3235&group_id=2291) from berlios <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/5d27cece2c24b5fe779f1560162a31442bf02617)</sup>
* `/friends online` show online friends only - [patch #3236](http://developer.berlios.de/patch/?func=detailpatch&patch_id=3236&group_id=2291) from berlios <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/8762667276b535d3385d51941d41d780089a7049)</sup>
* `/topic` feature to set text on a new line <sup>[issue](https://github.com/HarpyWar/pvpgn/issues/6)</sup>
* `/alert <message>` like /announce but message box shows instead of a text <sup>[issue](https://github.com/HarpyWar/pvpgn/issues/15)</sup>
* `/rehash <mode>` feature to rehash configs separately <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/ee04fdd23dfef90f0b852a6e90df23c7f5edc08e)</sup>
[Deleaker](http://www.deleaker.com/) helps us find memory leaks.
## Tracking
By default, tracking is enabled and is only used for the purpose of sending informational data (e.g. server description, homepage, uptime, amount of users) to tracking servers. To disable tracking, set ````track = 0```` in ````conf/bnetd.conf````.
Minor changes
--
* add original MOTD files with UTF-8 encoding
* add support files v1.2, there are no need to download it separately after install
* add ODBC support for CMake
* add latest versioncheck.conf
* skip_versioncheck, allow_bad_version are enabled by default in bnetd.conf - for easy start
* source code is formatted for better reading
* unused files are removed, only pvpgn source here
* unknown udp packets are logged with enabled debug mode only (it always chokes a log file before) <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/c39f9f03159b2edc8d2457d8134d84486378f9b1)
* add a file location for all the text files like MOTD (often a server admin doesn't know where a file is located)
* add option ignore-version for programs **bnchat** and **bnstat** - [patch #3184](http://developer.berlios.de/patch/?func=detailpatch&patch_id=3184&group_id=2291) from berlios <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/a1fb914c30d9d69d062e8f698f7d0e9bacf41367)
* help for all commands is displayed from bnhelp.conf and format changed for better reading, updated more help messages <sup>[issue](https://github.com/HarpyWar/pvpgn/issues/5)</sup>
* fix error in log when user sends a message with text length of 255 symbols <sup>[commit](https://github.com/HarpyWar/pvpgn/commit/af2baccdb8a2b624627caa94eac5595ac8f76e07)</sup>
* update default tracker servers in config, track is enabled by default <sup>issues [1](https://github.com/HarpyWar/pvpgn/issues/7), [2](https://github.com/HarpyWar/pvpgn/issues/18)</sup>
## Supported Clients
- **WarCraft 2: Battle.net Edition**: 2.02a, 2.02b
- **WarCraft 3: Reign of Chaos**\*: 1.13a, 1.13b, 1.14a, 1.14b, 1.15a, 1.16a, 1.17a, 1.18a, 1.19a, 1.19b, 1.20a, 1.20b, 1.20c, 1.20d, 1.20e, 1.21a, 1.21b, 1.22a, 1.23a, 1.24a, 1.24b, 1.24c, 1.24d, 1.24e, 1.25b, 1.26a, 1.27a, 1.27b, 1.28, 1.28.1, 1.28.2, 1.28.4, 1.28.5
- **WarCraft 3: The Frozen Throne**\*: 1.13a, 1.13b, 1.14a, 1.14b, 1.15a, 1.16a, 1.17a, 1.18a, 1.19a, 1.19b, 1.20a, 1.20b, 1.20c, 1.20d, 1.20e, 1.21a, 1.21b, 1.22a, 1.23a, 1.24a, 1.24b, 1.24c, 1.24d, 1.24e, 1.25b, 1.26a, 1.27a, 1.27b, 1.28, 1.28.1, 1.28.2, 1.28.4, 1.28.5
- **StarCraft**: 1.08, 1.08b, 1.09, 1.09b, 1.10, 1.11, 1.11b, 1.12, 1.12b, 1.13, 1.13b, 1.13c, 1.13d, 1.13e, 1.13f, 1.14, 1.15, 1.15.1, 1.15.2, 1.15.3, 1.16, 1.16.1, 1.17.0, 1.18.0
- **StarCraft: Brood War**: 1.08, 1.08b, 1.09, 1.09b, 1.10, 1.11, 1.11b, 1.12, 1.12b, 1.13, 1.13b, 1.13c, 1.13d, 1.13e, 1.13f, 1.14, 1.15, 1.15.1, 1.15.2, 1.15.3, 1.16, 1.16.1, 1.17.0, 1.18.0
- **Diablo**: 1.09, 1.09b
- **Diablo 2**: 1.10, 1.11, 1.11b, 1.12a, 1.13c, 1.14a, 1.14b, 1.14c, 1.14d
- **Diablo 2: Lord of Destruction**: 1.10, 1.11, 1.11b, 1.12a, 1.13c, 1.14a, 1.14b, 1.14c, 1.14d
- **Westwood Chat Client**: 4.221
- **Command & Conquer**: Win95 1.04a (using Westwood Chat)
- **Command & Conquer: Red Alert**: Win95 2.00 (using Westwood Chat), Win95 3.03
- **Command & Conquer: Red Alert 2**: 1.006
- **Command & Conquer: Tiberian Sun**: 2.03 ST-10
- **Command & Conquer: Tiberian Sun Firestorm**: 2.03 ST-10
- **Command & Conquer: Yuri's Revenge**: 1.001
- **Command & Conquer: Renegade**: 1.037
- **Nox**: 1.02b
- **Nox Quest**: 1.02b
- **Dune 2000**: 1.06
- **Emperor: Battle for Dune**: 1.09
\* WarCraft 3 clients are unable to connect to PvPGN servers without a client-side modification, through tools such as [W3L](https://github.com/w3lh/w3l), to disable server signature verification.
\* StarCraft clients beginning with patch 1.18 will not be supported by PvPGN-PRO due to protocol changes. A 1.18.0 versioncheck entry is included for compatibility with bot software.
Build source code
--
## Support
[Create an issue](https://github.com/pvpgn/pvpgn-server/issues) if you have any questions, suggestions, or anything else to say about PvPGN-PRO. Please note that D2GS is not part of the PvPGN project and is therefore unsupported here.
Set `loglevels = fatal,error,warn,info,debug,trace` in `bnetd.conf` before obtaining logs and posting them.
## Development
Submit pull requests to contribute to this project. Utilize C++11 features and adhere to the [C++ Core Guidelines](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md) whenever possible.
## Building
See [docs/ports.md](https://github.com/pvpgn/pvpgn-server/blob/master/docs/ports.md) for operating systems and compilers that have been confirmed to work with PvPGN. Any operating system that supports WinAPI or POSIX, and any C++11 compliant compiler should be able to build PvPGN. The CMake files have been hardcoded to reject compilers older than Visual Studio 2015 and GCC 5.1.
#### Windows
Use [Magic Builder](https://github.com/HarpyWar/pvpgn-magic-builder).
Use [Magic Builder](https://github.com/pvpgn/pvpgn-magic-builder).
#### Linux
[Русский](http://harpywar.com/?a=articles&b=2&c=1&d=74) | [English](http://harpywar.com/?a=articles&b=2&c=1&d=74&lang=en)
Alternatively, use cmake to generate the .sln project and build it from Visual Studio.
```
cmake -g "Visual Studio 14 2015" -H./ -B./build
```
This will generate .sln in `build` directory.
[![Vimeo](http://habrastorage.org/storage3/48c/5a9/4b1/48c5a94b1173242e311f8376be80a585.png)](https://vimeo.com/83763862)
#### Linux in general
Do not blindly run these commands. The main problem with older distributions is installing CMake 3.2.x and GCC 5, so external repositories are used in the examples.
```
apt-get install git install cmake make build-essential zlib1g-dev
apt-get install liblua5.1-0-dev #Lua support
apt-get install mysql-server mysql-client libmysqlclient-dev #MySQL support
cd /home
git clone https://github.com/pvpgn/pvpgn-server.git
cmake -D CMAKE_INSTALL_PREFIX=/usr/local/pvpgn -D WITH_MYSQL=true -D WITH_LUA=true ../
make
make install
```
#### Ubuntu 16.04, 18.04
```
sudo apt-get -y install build-essential git cmake zlib1g-dev
git clone https://github.com/pvpgn/pvpgn-server.git
cd pvpgn-server && cmake -G "Unix Makefiles" -H./ -B./build
cd build && make
```
#### Ubuntu 14.04
```
sudo apt-get -y install build-essential zlib1g-dev git
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get -y update
sudo apt-get -y install gcc-5 g++-5
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5
sudo add-apt-repository -y ppa:george-edison55/cmake-3.x
sudo apt-get update
sudo apt-get -y install cmake
git clone https://github.com/pvpgn/pvpgn-server.git
cd pvpgn-server && cmake -G "Unix Makefiles" -H./ -B./build
cd build && make
```
#### Debian 8 with clang compiler
```
sudo apt-get -y install build-essential zlib1g-dev clang libc++-dev git
wget https://cmake.org/files/v3.7/cmake-3.7.1-Linux-x86_64.tar.gz
tar xvfz cmake-3.7.1-Linux-x86_64.tar.gz
git clone https://github.com/pvpgn/pvpgn-server.git
cd pvpgn-server && CC=/usr/bin/clang CXX=/usr/bin/clang++ ../cmake-3.7.1-Linux-x86_64/bin/cmake -G "Unix Makefiles" -H./ -B./build
cd build && make
```
#### CentOS 7
```
sudo yum -y install epel-release centos-release-scl
sudo yum -y install git zlib-devel cmake3 devtoolset-4-gcc*
sudo ln -s /usr/bin/cmake3 /usr/bin/cmake
git clone https://github.com/pvpgn/pvpgn-server.git
cd pvpgn-server
CC=/opt/rh/devtoolset-4/root/usr/bin/gcc CXX=/opt/rh/devtoolset-4/root/usr/bin/g++ cmake -G "Unix Makefiles" -H./ -B./build
cd build && make
```
#### Fedora 25
```
sudo dnf -y install gcc-c++ gcc make zlib-devel cmake git
git clone https://github.com/pvpgn/pvpgn-server.git
cd pvpgn-server
cmake -G "Unix Makefiles" -H./ -B./build
cd build && make
```
#### FreeBSD 11
```
sudo pkg install -y git cmake
git clone https://github.com/pvpgn/pvpgn-server.git
cd pvpgn-server
cmake -G "Unix Makefiles" -H./ -B./build
cd build && make
```
Full instructions: [Русский](http://harpywar.com/?a=articles&b=2&c=1&d=74) | [English](http://harpywar.com/?a=articles&b=2&c=1&d=74&lang=en)
## Hosting on LAN or VPS with private IP address
Some VPS providers do not assign your server a direct public IP. If that is the case or you host at home behind NAT you need to setup the route translation in `address_translation.conf`. The public address is pushed as the route server address to game clients when seeking games. Failure to push the correct address to game clients results in players not being able to match and join games (long game search and error).
If your network interface is directly bound to public IP, PvPGN can figure it out on it's own and this step is not necessary.
## License
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

40
TODO
View file

@ -1,40 +0,0 @@
PvPGN TODO LIST AND WHATS BEING WORKED ON:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Release v2.0-PRO ROADMAP:
1. DOCUMENTATION (client and server documentation; a FAQ, HOWTO and a file
describing all configuration options). Site http://pvpgn.pro
2. i18n or some sort to support different language messages to users
3. Connectivity with Ghost++ to support DotA
Stuff not programmed for any specific version release:
* admin protocol (design an admin protocol and implement the server side and
a client lib)
* w3route server and serverside game packets
* extend/redesign storage to be used by both bnetd and d2cs/d2dbs
* complete tournament support with crash recovery option
* anonagame stuff
a. the new W3 AMM introduced with 1.15 patch
c. move w3route functions to its own .c/.h file (for w3route server)
e. tournament stuff
1. determine how games are limited to 30 minutes & map reveled at 25
2. complete the process for finals selection
3. make struct to hold / match / advance / eleminate finals players
and functions to acomplish this task
4. add stats recording for tournament games (did race wins)
* changing data references from accountnames to UIDs ....
* design a plugins support and move in time all the code in plugins (except
the core code of course)
* add some way to be able to read/write specific "runtime changable" bnetd.conf
entries (like while server is online doing /config "allow_unknown_version" "false")
* optimize PvPGN using "inline" functions in all "small" functions

View file

@ -1,9 +1,34 @@
branches:
only:
- master
- develop
os: Windows Server 2012
image: Visual Studio 2019
platform:
- x86
environment:
matrix:
- db: plain
db_id: 1
- db: mysql
db_id: 2
- db: pgsql
db_id: 3
- db: sqlite
db_id: 4
- db: odbc
db_id: 5
configuration:
# - Debug
- Release
matrix:
fast_finish: true
clone_folder: c:\pvpgn
install:
@ -13,17 +38,47 @@ install:
- cmd: ren pvpgn-magic-builder-master builder
- cmd: mkdir c:\builder\source\
- cmd: xcopy /E /R /K /Y /Q "c:\pvpgn" "c:\builder\source\"
- cmd: cd c:\builder\
- cmd: mkdir bin
- cmd: mkdir pdb
build:
project: c:\builder\build\pvpgn.sln
before_build:
- cmd: set APPVEYOR_REPO_COMMIT_SHORT=%APPVEYOR_REPO_COMMIT:~0,7%
# read version string from version.h to %PVPGN_VERSION% and append commit string inside that file
- cmd: module\tools\pvpgn_version.bat %APPVEYOR_REPO_COMMIT_SHORT%
- cmd: set COMPLETE_BUILD_VERSION=pvpgn-%APPVEYOR_REPO_BRANCH%-%PVPGN_VERSION%-%APPVEYOR_REPO_COMMIT_SHORT%
- ps: $env:PVPGN_ZIP=$env:COMPLETE_BUILD_VERSION + "_" + $env:DB + $(If ($env:CONFIGURATION -ne "Release") {"_" + ($env:CONFIGURATION).ToLower()} Else {""}) + ".zip"
- ps: $env:PVPGN_PDB_ZIP=$env:COMPLETE_BUILD_VERSION + "_" + $env:DB + $(If ($env:CONFIGURATION -ne "Release") {"_" + ($env:CONFIGURATION).ToLower()} Else {".pdb"}) + ".zip"
build_script:
- cmd: cd c:\builder\
- cmd: build_pvpgn.bat cmake_only 6 2 1 y
- cmd: call "%VS120COMNTOOLS%vsvars32.bat"
- cmd: set INCLUDE=c:\builder\module\include\atlmfc\;%INCLUDE%
- cmd: call "%FrameworkDir%%FrameworkVersion%\MSBuild.exe" c:\builder\build\pvpgn.sln /t:Rebuild /p:Configuration=Release;UseEnv=true /consoleloggerparameters:Summary;PerformanceSummary;Verbosity=minimal /maxcpucount
# build gui and console for each storage type
# build_pvpgn.bat params:
# 1. automatic build flag
# 2. visual studio version
# 3. console or gui
# 4. storage type
# 5. with or without lua
# 6. Release or Debug
# gui
- cmd: build_pvpgn.bat auto auto 2 %DB_ID% y %CONFIGURATION%
- cmd: move /Y %CONFIGURATION%\*.pdb pdb\ # move pdb files
- cmd: copy /Y %CONFIGURATION%\* bin\ # backup binary files
# console
- cmd: build_pvpgn.bat auto auto 1 %DB_ID% y %CONFIGURATION%
- cmd: move /Y %CONFIGURATION%\*.pdb pdb\ # move pdb files
- cmd: move /Y bin\* %CONFIGURATION% # move back binaries after build console version
# create zip artifacts
- cmd: 7z.exe a %PVPGN_ZIP% .\%CONFIGURATION%\*
- cmd: 7z.exe a %PVPGN_PDB_ZIP% .\pdb\*
deploy_script:
- ps: |
Push-AppveyorArtifact $env:PVPGN_ZIP
Push-AppveyorArtifact $env:PVPGN_PDB_ZIP
# check the latest build executable for exists
test:
assemblies:
- '**\src\bnetd\Release\bnetd.exe'
- '**\src\bnetd\%CONFIGURATION%\bnetd.exe'

View file

@ -1,59 +0,0 @@
# - Check if the files can be included
#
# CHECK_INCLUDE_FILES_CXX(INCLUDE VARIABLE)
#
# INCLUDE - list of files to include
# VARIABLE - variable to return result
#
# The following variables may be set before calling this macro to
# modify the way the check is run:
#
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
# CMAKE_REQUIRED_INCLUDES = list of include directories
MACRO(CHECK_INCLUDE_FILES_CXX INCLUDE VARIABLE)
IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
SET(CMAKE_CONFIGURABLE_FILE_CONTENT "/* */\n")
IF(CMAKE_REQUIRED_INCLUDES)
SET(CHECK_INCLUDE_FILES_CXX_INCLUDE_DIRS "-DINCLUDE_DIRECTORIES=${CMAKE_REQUIRED_INCLUDES}")
ELSE(CMAKE_REQUIRED_INCLUDES)
SET(CHECK_INCLUDE_FILES_CXX_INCLUDE_DIRS)
ENDIF(CMAKE_REQUIRED_INCLUDES)
SET(CHECK_INCLUDE_FILES_CXX_CONTENT "/* */\n")
SET(MACRO_CHECK_INCLUDE_FILES_CXX_FLAGS ${CMAKE_REQUIRED_FLAGS})
FOREACH(FILE ${INCLUDE})
SET(CMAKE_CONFIGURABLE_FILE_CONTENT
"${CMAKE_CONFIGURABLE_FILE_CONTENT}#include <${FILE}>\n")
ENDFOREACH(FILE)
SET(CMAKE_CONFIGURABLE_FILE_CONTENT
"${CMAKE_CONFIGURABLE_FILE_CONTENT}\n\nint main(){return 0;}\n")
CONFIGURE_FILE("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFiles.cxx" @ONLY IMMEDIATE)
MESSAGE(STATUS "Looking for include files ${VARIABLE}")
TRY_COMPILE(${VARIABLE}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFiles.cxx
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
CMAKE_FLAGS
-DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILES_CXX_FLAGS}
"${CHECK_INCLUDE_FILES_CXX_INCLUDE_DIRS}"
OUTPUT_VARIABLE OUTPUT)
IF(${VARIABLE})
MESSAGE(STATUS "Looking for include files ${VARIABLE} - found")
SET(${VARIABLE} 1 CACHE INTERNAL "Have include ${VARIABLE}")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if files ${INCLUDE} "
"exist passed with the following output:\n"
"${OUTPUT}\n\n")
ELSE(${VARIABLE})
MESSAGE(STATUS "Looking for include files ${VARIABLE} - not found.")
SET(${VARIABLE} "" CACHE INTERNAL "Have includes ${VARIABLE}")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if files ${INCLUDE} "
"exist failed with the following output:\n"
"${OUTPUT}\nSource:\n${CMAKE_CONFIGURABLE_FILE_CONTENT}\n")
ENDIF(${VARIABLE})
ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$")
ENDMACRO(CHECK_INCLUDE_FILES_CXX)

View file

@ -1,68 +0,0 @@
# - Check sizeof a type
# CHECK_TYPE_SIZE_CXX(TYPE VARIABLE)
# Check if the type exists and determine size of type. if the type
# exists, the size will be stored to the variable.
# VARIABLE - variable to store size if the type exists.
# HAVE_${VARIABLE} - does the variable exists or not
# The following variables may be set before calling this macro to
# modify the way the check is run:
#
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
# CMAKE_REQUIRED_INCLUDES = list of include directories
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
MACRO(CHECK_TYPE_SIZE_CXX TYPE VARIABLE)
SET(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS 1)
IF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
SET(CHECK_TYPE_SIZE_CXX_TYPE "${TYPE}")
SET(MACRO_CHECK_TYPE_CXX_SIZE_FLAGS
"${CMAKE_REQUIRED_FLAGS}")
FOREACH(def HAVE_SYS_TYPES_H HAVE_STDINT_H HAVE_STDDEF_H)
IF("${def}")
SET(MACRO_CHECK_TYPE_SIZE_CXX_FLAGS
"${MACRO_CHECK_TYPE_SIZE_CXX_FLAGS} -D${def}")
ENDIF("${def}")
ENDFOREACH(def)
SET(CHECK_TYPE_SIZE_CXX_PREINCLUDE)
SET(CHECK_TYPE_SIZE_CXX_PREMAIN)
FOREACH(def ${CMAKE_EXTRA_INCLUDE_FILES})
SET(CHECK_TYPE_SIZE_CXX_PREMAIN "${CHECK_TYPE_SIZE_CXX_PREMAIN}#include \"${def}\"\n")
ENDFOREACH(def)
CONFIGURE_FILE("${CMAKE_MODULE_PATH}/CheckTypeSizeCXX.cxx.in"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSizeCXX.cxx" IMMEDIATE @ONLY)
FILE(READ "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSizeCXX.cxx"
CHECK_TYPE_SIZE_CXX_FILE_CONTENT)
MESSAGE(STATUS "Check size of ${TYPE}")
IF(CMAKE_REQUIRED_LIBRARIES)
SET(CHECK_TYPE_SIZE_CXX_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
ELSE(CMAKE_REQUIRED_LIBRARIES)
SET(CHECK_TYPE_SIZE_CXX_ADD_LIBRARIES)
ENDIF(CMAKE_REQUIRED_LIBRARIES)
IF(CMAKE_REQUIRED_INCLUDES)
SET(CHECK_TYPE_SIZE_CXX_ADD_INCLUDES
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
ELSE(CMAKE_REQUIRED_INCLUDES)
SET(CHECK_TYPE_SIZE_CXX_ADD_INCLUDES)
ENDIF(CMAKE_REQUIRED_INCLUDES)
TRY_RUN(${VARIABLE} HAVE_${VARIABLE}
${CMAKE_BINARY_DIR}
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSizeCXX.cxx"
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_CXX_FLAGS}
"${CHECK_TYPE_SIZE_CXX_ADD_LIBRARIES}"
"${CHECK_TYPE_SIZE_CXX_ADD_INCLUDES}"
OUTPUT_VARIABLE OUTPUT)
IF(HAVE_${VARIABLE})
MESSAGE(STATUS "Check size of ${TYPE} - done")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining size of ${TYPE} passed with the following output:\n${OUTPUT}\n\n")
ELSE(HAVE_${VARIABLE})
MESSAGE(STATUS "Check size of ${TYPE} - failed")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\nCheckTypeSizeCXX.cxx:\n${CHECK_TYPE_SIZE_CXX_FILE_CONTENT}\n\n")
ENDIF(HAVE_${VARIABLE})
ENDIF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
SET(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS )
ENDMACRO(CHECK_TYPE_SIZE_CXX)

View file

@ -1,28 +0,0 @@
#cmakedefine CHECK_TYPE_SIZE_CXX_TYPE @CHECK_TYPE_SIZE_CXX_TYPE@
#ifdef CHECK_TYPE_SIZE_CXX_TYPE
@CHECK_TYPE_SIZE_CXX_PREINCLUDE@
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif /* HAVE_SYS_TYPES_H */
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif /* HAVE_STDINT_H */
#ifdef HAVE_STDDEF_H
# include <stddef.h>
#endif /* HAVE_STDDEF_H */
@CHECK_TYPE_SIZE_CXX_PREMAIN@
int main(int ac, char*av[]){
if(ac > 1000){return *av[0];}
return sizeof(CHECK_TYPE_SIZE_CXX_TYPE);
}
#else /* CHECK_TYPE_SIZE_CXX_TYPE */
# error "CHECK_TYPE_SIZE_CXX_TYPE has to specify the type"
#endif /* CHECK_TYPE_SIZE_CXX_TYPE */

View file

@ -3,116 +3,31 @@ IF (NOT APPLICATION_NAME)
SET(APPLICATION_NAME ${PROJECT_NAME})
ENDIF (NOT APPLICATION_NAME)
# Suffix for Linux
SET(LIB_SUFFIX
CACHE STRING "Define suffix of directory name (32/64)"
)
SET(EXEC_INSTALL_PREFIX
"${CMAKE_INSTALL_PREFIX}"
CACHE PATH "Base directory for executables and libraries"
FORCE
)
SET(SHARE_INSTALL_PREFIX
"${CMAKE_INSTALL_PREFIX}/share"
CACHE PATH "Base directory for files which go to share/"
FORCE
)
SET(DATA_INSTALL_PREFIX
"${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}"
CACHE PATH "The parent directory where applications can install their data" FORCE)
# The following are directories where stuff will be installed to
CACHE PATH "The parent directory where applications can install their data"
FORCE
)
SET(BIN_INSTALL_DIR
"${EXEC_INSTALL_PREFIX}/bin"
CACHE PATH "The ${APPLICATION_NAME} binary install dir (default prefix/bin)"
FORCE
)
if(WIN32)
SET(SBIN_INSTALL_DIR
"${EXEC_INSTALL_PREFIX}"
CACHE PATH "The ${APPLICATION_NAME} sbin install dir (default prefix/sbin)"
FORCE
)
else(WIN32)
SET(SBIN_INSTALL_DIR
"${EXEC_INSTALL_PREFIX}/sbin"
CACHE PATH "The ${APPLICATION_NAME} sbin install dir (default prefix/sbin)"
FORCE
)
endif(WIN32)
SET(LIB_INSTALL_DIR
"${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}"
CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is prefix/lib)"
FORCE
)
SET(LIBEXEC_INSTALL_DIR
"${EXEC_INSTALL_PREFIX}/libexec"
CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is prefix/libexec)"
FORCE
)
SET(PLUGIN_INSTALL_DIR
"${LIB_INSTALL_DIR}/${APPLICATION_NAME}"
CACHE PATH "The subdirectory relative to the install prefix where plugins will be installed (default is prefix/lib/${APPLICATION_NAME})"
FORCE
)
SET(INCLUDE_INSTALL_DIR
"${CMAKE_INSTALL_PREFIX}/include"
CACHE PATH "The subdirectory to the header prefix (default prefix/include)"
FORCE
)
SET(DATA_INSTALL_DIR
"${DATA_INSTALL_PREFIX}"
CACHE PATH "The parent directory where applications can install their data (default prefix/share/${APPLICATION_NAME})"
FORCE
)
SET(HTML_INSTALL_DIR
"${DATA_INSTALL_PREFIX}/doc/HTML"
CACHE PATH "The HTML install dir for documentation (default data/doc/html)"
FORCE
)
SET(ICON_INSTALL_DIR
"${DATA_INSTALL_PREFIX}/icons"
CACHE PATH "The icon install dir (default data/icons/)"
FORCE
)
SET(SOUND_INSTALL_DIR
"${DATA_INSTALL_PREFIX}/sounds"
CACHE PATH "The install dir for sound files (default data/sounds)"
FORCE
)
SET(LOCALE_INSTALL_DIR
"${SHARE_INSTALL_PREFIX}/locale"
CACHE PATH "The install dir for translations (default prefix/share/locale)"
FORCE
)
if(WIN32)
SET(SYSCONF_INSTALL_DIR
"${EXEC_INSTALL_PREFIX}/conf"
CACHE PATH "The ${APPLICATION_NAME} sysconfig install dir (default conf)"
FORCE
)
else(WIN32)
SET(SYSCONF_INSTALL_DIR
"${EXEC_INSTALL_PREFIX}/etc/${APPLICATION_NAME}"
CACHE PATH "The ${APPLICATION_NAME} sysconfig install dir (default prefix/etc)"
FORCE
)
endif(WIN32)
SET(MAN_INSTALL_DIR
"${SHARE_INSTALL_PREFIX}/man"
CACHE PATH "The ${APPLICATION_NAME} man install dir (default prefix/man)"
FORCE
)
SET(INFO_INSTALL_DIR
"${SHARE_INSTALL_PREFIX}/info"
CACHE PATH "The ${APPLICATION_NAME} info install dir (default prefix/info)"
FORCE
)
#***********************************#
if(WIN32)
SET(LOCALSTATE_INSTALL_DIR
@ -120,11 +35,44 @@ if(WIN32)
CACHE PATH "The ${APPLICATION_NAME} local state install dir (default prefix/var)"
FORCE
)
else(WIN32)
else()
SET(LOCALSTATE_INSTALL_DIR
"${EXEC_INSTALL_PREFIX}/var/${APPLICATION_NAME}"
CACHE PATH "The ${APPLICATION_NAME} local state install dir (default prefix/var)"
FORCE
)
endif(WIN32)
endif()
SET(MAN_INSTALL_DIR
"${SHARE_INSTALL_PREFIX}/man"
CACHE PATH "The ${APPLICATION_NAME} man install dir (default prefix/man)"
FORCE
)
if(WIN32)
SET(SBIN_INSTALL_DIR
"${EXEC_INSTALL_PREFIX}"
CACHE PATH "The ${APPLICATION_NAME} sbin install dir (default prefix/sbin)"
FORCE
)
else()
SET(SBIN_INSTALL_DIR
"${EXEC_INSTALL_PREFIX}/sbin"
CACHE PATH "The ${APPLICATION_NAME} sbin install dir (default prefix/sbin)"
FORCE
)
endif()
if(WIN32)
SET(SYSCONF_INSTALL_DIR
"${EXEC_INSTALL_PREFIX}/conf"
CACHE PATH "The ${APPLICATION_NAME} sysconfig install dir (default conf)"
FORCE
)
else()
SET(SYSCONF_INSTALL_DIR
"${EXEC_INSTALL_PREFIX}/etc/${APPLICATION_NAME}"
CACHE PATH "The ${APPLICATION_NAME} sysconfig install dir (default prefix/etc)"
FORCE
)
endif()

View file

@ -1,72 +0,0 @@
# Copyright (c) 2013 Martin Felis &lt;martin@fysx.org&gt;
# License: Public Domain (Unlicense: http://unlicense.org/)
# Modified by Edvin "Lego3" Linge for the CorsixTH project.
#
# Try to find Lua or LuaJIT depending on the variable WITH_LUAJIT.
# Sets the following variables:
# LUA_FOUND
# LUA_INCLUDE_DIR
# LUA_LIBRARY
#
# Use it in a CMakeLists.txt script as:
#
# OPTION (WITH_LUAJIT "Use LuaJIT instead of default Lua" OFF)
# UNSET(LUA_FOUND CACHE)
# UNSET(LUA_INCLUDE_DIR CACHE)
# UNSET(LUA_LIBRARY CACHE)
# FIND_PACKAGE (Lua REQUIRED)
SET (LUA_FOUND FALSE)
SET (LUA_LIBRARIES)
SET (LUA_INTERPRETER_TYPE "Lua5.1")
SET (LUA_LIBRARY_NAME lua5.1 lua51 lua lua-5.1)
SET (LUA_INCLUDE_DIRS include/lua5.1 include/lua51 include/lua include/lua-5.1 include)
FIND_PATH (LUA_INCLUDE_DIR lua.h
HINTS
ENV LUA_DIR
PATH_SUFFIXES ${LUA_INCLUDE_DIRS}
PATHS
/opt/local
/usr/local
/usr
/opt
/sw
~/Library/Frameworks
/Library/Frameworks
)
FIND_LIBRARY (LUA_LIBRARY NAMES ${LUA_LIBRARY_NAME}
HINTS
ENV LUA_DIR
PATH_SUFFIXES lib
PATHS
/usr
/usr/local
/opt/local
/opt
/sw
~/Library/Frameworks
/Library/Frameworks
)
IF (LUA_INCLUDE_DIR AND LUA_LIBRARY)
SET (LUA_FOUND TRUE)
SET (LUA_LIBRARIES ${LUA_LIBRARY})
ENDIF (LUA_INCLUDE_DIR AND LUA_LIBRARY)
IF (LUA_FOUND)
IF (NOT Lua_FIND_QUIETLY)
MESSAGE(STATUS "Found ${LUA_INTERPRETER_TYPE} library: ${LUA_LIBRARY}")
ENDIF (NOT Lua_FIND_QUIETLY)
ELSE (LUA_FOUND)
IF (Lua_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find ${LUA_INTERPRETER_TYPE}")
ENDIF (Lua_FIND_REQUIRED)
ENDIF (LUA_FOUND)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua DEFAULT_MSG LUA_LIBRARY LUA_INCLUDE_DIR)
MARK_AS_ADVANCED ( LUA_INCLUDE_DIR LUA_LIBRARY)

View file

@ -1,46 +1,61 @@
# - Find mysqlclient
# Find the native MySQL includes and library
# - Try to find MySQL.
# Once done this will define:
# MYSQL_FOUND - If false, do not try to use MySQL.
# MYSQL_INCLUDE_DIRS - Where to find mysql.h, etc.
# MYSQL_LIBRARIES - The libraries to link against.
# MYSQL_VERSION_STRING - Version in a string of MySQL.
#
# MYSQL_INCLUDE_DIR - where to find mysql.h, etc.
# MYSQL_LIBRARIES - List of libraries when using MySQL.
# MYSQL_FOUND - True if MySQL found.
# Created by RenatoUtsch based on eAthena implementation.
#
# Please note that this module only supports Windows and Linux officially, but
# should work on all UNIX-like operational systems too.
#
#=============================================================================
# Copyright 2012 RenatoUtsch
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
if( WIN32 )
set(MYENV "PROGRAMFILES(X86)")
find_path( MYSQL_INCLUDE_DIR
NAMES "mysql.h"
PATHS "$ENV{PROGRAMFILES}/MySQL/*/include"
"$ENV{${MYENV}}/MySQL/*/include"
"$ENV{SYSTEMDRIVE}/MySQL/*/include" )
find_library( MYSQL_LIBRARY
NAMES "mysqlclient" "mysqlclient_r" "libmysql"
PATHS "$ENV{PROGRAMFILES}/MySQL/*/lib"
"$ENV{${MYENV}}/MySQL/*/lib"
"$ENV{SYSTEMDRIVE}/MySQL/*/lib" )
else()
find_path( MYSQL_INCLUDE_DIR
NAMES "mysql.h"
PATHS "/usr/include/mysql"
"/usr/local/include/mysql"
"/usr/mysql/include/mysql" )
find_library( MYSQL_LIBRARY
NAMES "mysqlclient" "mysqlclient_r"
PATHS "/lib/mysql"
"/lib64/mysql"
"/usr/lib/mysql"
"/usr/lib64/mysql"
"/usr/local/lib/mysql"
"/usr/local/lib64/mysql"
"/usr/mysql/lib/mysql"
"/usr/mysql/lib64/mysql" )
endif()
IF (MYSQL_INCLUDE_DIR)
# Already in cache, be silent
SET(MySQL_FIND_QUIETLY TRUE)
ENDIF (MYSQL_INCLUDE_DIR)
FIND_PATH(MYSQL_INCLUDE_DIR mysql.h
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.0;Location]/include"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 4.1;Location]/include"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 4.0;Location]/include"
/usr/local/mysql/include
/usr/local/include/mysql
/usr/local/include
/usr/include/mysql
/usr/include
/usr/mysql/include
)
IF(MSVC)
SET(MYSQL_NAMES libmysql)
ELSE(MSVC)
SET(MYSQL_NAMES mysqlclient mysqlclient_r)
ENDIF(MSVC)
SET(MYSQL_SEARCH_LIB_PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.0;Location]/lib/opt"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 4.1;Location]/lib/opt"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 4.0;Location]/lib/opt"
/usr/local/mysql/lib
/usr/local/lib/mysql
/usr/local/lib
/usr/lib/mysql
/usr/lib
)
FIND_LIBRARY(MYSQL_LIBRARY
NAMES ${MYSQL_NAMES}
PATHS ${MYSQL_SEARCH_LIB_PATHS}
)
IF (MYSQL_INCLUDE_DIR AND MYSQL_LIBRARY)
SET(MYSQL_FOUND TRUE)
@ -51,9 +66,7 @@ ELSE (MYSQL_INCLUDE_DIR AND MYSQL_LIBRARY)
ENDIF (MYSQL_INCLUDE_DIR AND MYSQL_LIBRARY)
IF (MYSQL_FOUND)
IF (NOT MySQL_FIND_QUIETLY)
MESSAGE(STATUS "Found MySQL: ${MYSQL_LIBRARY}")
ENDIF (NOT MySQL_FIND_QUIETLY)
ELSE (MYSQL_FOUND)
IF (MySQL_FIND_REQUIRED)
MESSAGE(STATUS "Looked for MySQL libraries named ${MYSQL_NAMES}.")

View file

@ -1,51 +0,0 @@
# - Find zlib
# Find the native ZLIB includes and library
#
# ZLIB_INCLUDE_DIR - where to find zlib.h, etc.
# ZLIB_LIBRARIES - List of libraries when using zlib.
# ZLIB_FOUND - True if zlib found.
IF (ZLIB_INCLUDE_DIR)
# Already in cache, be silent
SET(ZLIB_FIND_QUIETLY TRUE)
ENDIF (ZLIB_INCLUDE_DIR)
FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]/include"
/usr/local/include
/usr/include
${CMAKE_SOURCE_DIR}/zlib
)
SET(ZLIB_NAMES z zlib zdll zlibwapi)
FIND_LIBRARY(ZLIB_LIBRARY
NAMES ${ZLIB_NAMES}
PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]/lib"
/usr/lib /usr/local/lib ${CMAKE_SOURCE_DIR}/zlib
)
IF (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
SET(ZLIB_FOUND TRUE)
SET( ZLIB_LIBRARIES ${ZLIB_LIBRARY} )
ELSE (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
SET(ZLIB_FOUND FALSE)
SET( ZLIB_LIBRARIES )
ENDIF (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
IF (ZLIB_FOUND)
IF (NOT ZLIB_FIND_QUIETLY)
MESSAGE(STATUS "Found ZLIB: ${ZLIB_LIBRARY}")
ENDIF (NOT ZLIB_FIND_QUIETLY)
ELSE (ZLIB_FOUND)
IF (ZLIB_FIND_REQUIRED)
MESSAGE(STATUS "Looked for Z libraries named ${ZLIBS_NAMES}.")
MESSAGE(FATAL_ERROR "Could NOT find z library")
ENDIF (ZLIB_FIND_REQUIRED)
ENDIF (ZLIB_FOUND)
MARK_AS_ADVANCED(
ZLIB_LIBRARY
ZLIB_INCLUDE_DIR
)

View file

@ -1,10 +1,10 @@
# generate the configs with proper line endings
set(OUTPUT_CONFS ad.conf anongame_infos.conf address_translation.conf
set(OUTPUT_CONFS ad.json anongame_infos.conf address_translation.conf
autoupdate.conf bnalias.conf bnban.conf bnetd_default_user.plain
bnissue.txt bnmaps.conf bnxpcalc.conf
bnxplevel.conf channel.conf command_groups.conf realm.conf
sql_DB_layout.conf supportfile.conf topics.conf
tournament.conf versioncheck.conf icons.conf)
tournament.conf versioncheck.json icons.conf)
foreach(CONF ${OUTPUT_CONFS})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${CONF}.in ${CMAKE_CURRENT_BINARY_DIR}/${CONF} @ONLY)
endforeach(CONF)
@ -15,15 +15,12 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/d2cs.conf.in ${CMAKE_CURRENT_BINARY_D
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/d2dbs.conf.in ${CMAKE_CURRENT_BINARY_DIR}/d2dbs.conf)
if(WITH_BNETD)
set(BNETD_CONFS bnetd.conf ad.conf anongame_infos.conf address_translation.conf
set(BNETD_CONFS bnetd.conf ad.json anongame_infos.conf address_translation.conf
autoupdate.conf bnalias.conf bnban.conf
bnetd_default_user.plain bnissue.txt bnmaps.conf
bnxpcalc.conf bnxplevel.conf channel.conf command_groups.conf
realm.conf sql_DB_layout.conf supportfile.conf topics.conf
tournament.conf versioncheck.conf icons.conf)
# special treatment for non .in files
install(FILES bnetd_default_user.cdb DESTINATION ${SYSCONFDIR})
tournament.conf versioncheck.json icons.conf)
endif(WITH_BNETD)
if(WITH_D2CS)

View file

@ -1,73 +0,0 @@
##############################################################################
# ad.list - Configuration for bnetd ad banners #
#----------------------------------------------------------------------------#
# #
# Quotes (") are required around the strings, but they are not allowed #
# inside them. #
# #
# The "file name" indicates the name of the file containing the actual ad. #
# The files must be in the files/ directory and no path components should be #
# listed here, only the filename portion. #
# #
# ID uniquely identifies the ad when referring to it from the "next" field #
# (must be higher than 0). #
# #
# The "when" field determines which ad banners should be picked to start a #
# sequence. These can be used to make the server avoid picking an "answer" #
# banner before its corresponding "question" banner by setting it to "start" #
# or "init". The first banner that is chosen when the user logs in is an #
# "init" banner. These banners are not reused, so you may want to double #
# list them as "start" banners. #
# #
# The "time" field is the number of seconds that the banner should be #
# displayed on the client. If it is zero, the ad will be displayed forever. #
# #
# The "URL" field is the location that the user will be sent to if (s)he #
# clicks on the ad. #
# #
# The "next" field determines which banner will be displayed next. If it is #
# zero, then a start banner may be chosen randomly. #
# #
# The "client" field determines which banner will be displayed to which #
# client. Starting with Warcraft III banners are .mng files which are not #
# visible by all clients (and .pcx files dont show on Warcraft III). If this #
# field is NULL than it will be shown to all clients _except_ those who have #
# a specific clienttag line. #
# #
# The "lang" field allows to limit display of certain banners to clients #
# that identified with a specific language tag. A value of "any" means #
# this banner will be chosen if no banner is defined for a given language. #
#
# --file name-- -ID- -when- time ---------------URL--------------- --next-- --client-- --lang--#
"ad000001.mng" 1 init 30 "http://pvpgn.berlios.de" 0x000000 "WAR3" "any"
"ad000001.mng" 2 start 30 "http://pvpgn.berlios.de" 0x000000 "WAR3" "any"
"ad000004.mng" 3 init 30 "http://pvpgn.berlios.de" 0x000000 "WAR3" "any"
"ad000004.mng" 4 start 30 "http://pvpgn.berlios.de" 0x000000 "WAR3" "any"
"ad000001.mng" 5 init 30 "http://pvpgn.berlios.de" 0x000000 "W3XP" "any"
"ad000001.mng" 6 start 30 "http://pvpgn.berlios.de" 0x000000 "W3XP" "any"
"ad000004.mng" 7 init 30 "http://pvpgn.berlios.de" 0x000000 "W3XP" "any"
"ad000004.mng" 8 start 30 "http://pvpgn.berlios.de" 0x000000 "W3XP" "any"
"ad000001.smk" 9 init 30 "http://pvpgn.berlios.de" 0x000000 "NULL" "any"
"ad000001.smk" 10 start 30 "http://pvpgn.berlios.de" 0x000000 "NULL" "any"
# "ad000001.smk" 100 init 30 "http://en.wikipedia.org/wiki/Earth" 0x000000 "NULL" "any"
# "ad000001.smk" 101 start 30 "http://en.wikipedia.org/wiki/Earth" 0x00006E "NULL" "any"
# "ad000001.smk" 102 init 30 "http://en.wikipedia.org/wiki/Germany" 0x000000 "NULL" "deDE"
# "ad000001.smk" 103 start 30 "http://en.wikipedia.org/wiki/Germany" 0x00006E "NULL" "deDE"
# "ad000001.smk" 104 init 30 "http://en.wikipedia.org/wiki/USA" 0x000000 "NULL" "enUS"
# "ad000001.smk" 105 start 30 "http://en.wikipedia.org/wiki/USA" 0x00006E "NULL" "enUS"
# "ad000001.smk" 106 init 30 "http://en.wikipedia.org/wiki/France" 0x000000 "NULL" "frFR"
# "ad000001.smk" 107 start 30 "http://en.wikipedia.org/wiki/France" 0x00006E "NULL" "frFR"
# "ad000001.smk" 108 init 30 "http://en.wikipedia.org/wiki/Italy" 0x000000 "NULL" "itIT"
# "ad000001.smk" 109 start 30 "http://en.wikipedia.org/wiki/Italy" 0x00006E "NULL" "itIT"
# "ad000001.smk" 110 norm 30 "http://pvpgn.berlios.de" 0x000000 "NULL" "any"
#
# #
##############################################################################

9
conf/ad.json.in Normal file
View file

@ -0,0 +1,9 @@
{
"ads":
[
{"filename": "ad000001.png", "url": "http://pvpgn.pro", "client": "W3XP", "lang": "NULL"},
{"filename": "ad000002.mng", "url": "http://pvpgn.pro", "client": "W3XP", "lang": "NULL"},
{"filename": "ad000001.smk", "url": "http://pvpgn.pro", "client": "NULL", "lang": "NULL"},
{"filename": "ad000002.smk", "url": "http://pvpgn.pro", "client": "NULL", "lang": "NULL"}
]
}

View file

@ -35,24 +35,44 @@
# ${-19} - substitute arguments 0-19 here #
# ${2-} - substitue all arguments from 2 until the end here #
# #
@
//doubt //dt //d
[0]/me looks with doubt
[1+]/me looks at ${1-} with doubt
@
//numusers //nu
[0]%IThere are %u users online.
[0]%IThere are %g games online.
[0]%IThere are %c channels online.
[1+]%EThat command does not take any arguments.
@
//askban //ab
[2+]/w $1 Please ban ${2-}.
@
//statsme //sm
[0]/stats %u
@
//pvpgn
[*]/announce PVPGN rulez!
# %a - Number of registered accounts #
# %c - Number of existing channels #
# %g - Number of running games #
# %G - Number of games with the same clienttag #
# %h - Hostname of the server #
# %H - Contact name (as set in bnetd.conf) #
# %i - The userid of the user #
# %I - The username of the user #
# %N - Name of the game the user has connected with #
# %m - Check the user's mail #
# %r - IP address of the user #
# %s - Servername #
# %t - The clienttag of the user #
# %u - Number of users currently logged in #
# %U - Number of users logged in with the same clienttag #
# %v - Server version #
# #
# Examples #
#@
#//doubt //dt //d
#[0]/me looks with doubt
#[1+]/me looks at ${1-} with doubt
#@
#//numusers //nu
#[0]%IThere are %u users online.
#[0]%IThere are %g games online.
#[0]%IThere are %c channels online.
#[1+]%EThat command does not take any arguments.
#@
#//askban //ab
#[2+]/w $1 Please ban ${2-}.
#@
#//statsme //sm
#[0]/stats %u
#@
#//pvpgn
#[*]/announce PVPGN rulez!
#
# #
##############################################################################

View file

@ -34,8 +34,6 @@
# Syntax: #
# * for plain file driver: #
# storage_path = file:mode=plain;dir=<path_to_user_files>;clan=<path_to_clan_files>;default=/path/to/default/account #
# * for cdb file driver: #
# storage_path = file:mode=cdb;dir=<path_to_cdb_files>;clan=<path_to_clan_files>;default=/path/to/default/account #
# * for sql driver: #
# storage_path = sql:variable=value;...;default=0 (0 is the default uid) #
# #
@ -52,7 +50,6 @@
# #
# Examples: #
# storage_path = "file:mode=plain;dir=${LOCALSTATEDIR}/users;clan=${LOCALSTATEDIR}/clans;team=${LOCALSTATEDIR}/teams;default=${SYSCONFDIR}/bnetd_default_user.plain"
# storage_path = "file:mode=cdb;dir=${LOCALSTATEDIR}/userscdb;clan=${LOCALSTATEDIR}/clans;team=${LOCALSTATEDIR}/teams;default=${SYSCONFDIR}/bnetd_default_user.cdb"
# storage_path = "sql:mode=mysql;host=127.0.0.1;name=PVPGN;user=pvpgn;pass=pvpgnrocks;default=0;prefix=pvpgn_"
# storage_path = "sql:mode=pgsql;host=127.0.0.1;name=pvpgn;user=pvpgn;pass=pvpgnrocks;default=0;prefix=pvpgn_"
# storage_path = "sql:mode=sqlite3;name=${LOCALSTATEDIR}/users.db;default=0;prefix=pvpgn_"
@ -78,14 +75,14 @@ userlogdir = "${LOCALSTATEDIR}/userlogs"
i18ndir = "${SYSCONFDIR}/i18n"
issuefile = "${SYSCONFDIR}/bnissue.txt"
channelfile = "${SYSCONFDIR}/channel.conf"
adfile = "${SYSCONFDIR}/ad.conf"
adfile = "${SYSCONFDIR}/ad.json"
topicfile = "${SYSCONFDIR}/topics.conf"
ipbanfile = "${SYSCONFDIR}/bnban.conf"
mpqfile = "${SYSCONFDIR}/autoupdate.conf"
logfile = "${LOCALSTATEDIR}/bnetd.log"
realmfile = "${SYSCONFDIR}/realm.conf"
maildir = "${LOCALSTATEDIR}/bnmail"
versioncheck_file = "${SYSCONFDIR}/versioncheck.conf"
versioncheck_file = "${SYSCONFDIR}/versioncheck.json"
mapsfile = "${SYSCONFDIR}/bnmaps.conf"
xplevelfile = "${SYSCONFDIR}/bnxplevel.conf"
xpcalcfile = "${SYSCONFDIR}/bnxpcalc.conf"
@ -169,6 +166,7 @@ allow_d2cs_setname = true
# the "filedir" directory specified above.
iconfile = "icons.bni"
war3_iconfile = "icons-WAR3.bni"
star_iconfile = "icons_STAR.bni"
# #
##############################################################################
@ -208,19 +206,6 @@ war3_iconfile = "icons-WAR3.bni"
# Example: allowed_clients = war3,w3xp
allowed_clients = all
# If this option is enabled, the verification step is skipped if possible.
# This only works with clients < 109. It is useful because you no longer
# need any of the IX86AUTH?.MPQ and PMACAUTH?.MPQ files. Note that it will
# also skip over all the autoupdate checks effectively disabling it.
#
# If you disable this you must have one or more of the MPQ files. Otherwise
# clients will hang when they first connect because they are attempting to
# download them. The versioncheck can only be skipped for clients older
# than 109. Starting with version 109 the clients will always do version
# checking since they do not function properly if the server does not
# request it.
skip_versioncheck = true
# If you enable the version checks but want to allow clients that don't pass
# the checksum test then enable this.
allow_bad_version = true
@ -231,19 +216,6 @@ allow_bad_version = true
# is a good idea.
allow_unknown_version = true
# This defines how the exeinfo field in the versioncheck file is being
# checked. You can choose between no match at all [none] (default),
# exact match [exact], exact case-sensitive match [exactcase], dumb wildcard
# match [wildcard], and parsed value comparison [parse].
# NOTE: [parse] needs the mktime() function and might therefore not work on
# every system.
version_exeinfo_match = none
# If you have choosen [parse] above, this is the tolerance with which
# the time can differ. The value must be given in seconds. If it's 0 this
# check is disabled.
version_exeinfo_maxdiff = 0
# #
##############################################################################
@ -295,7 +267,7 @@ new_accounts = true
# Set this to the maximum number of accounts you want to allow to be
# created on your server. A value of 0 means infinite and is the default.
#max_accounts = 0
max_accounts = 0
# If someone attempts to log in more than once, should it kick off the old
# login, or deny the new one?
@ -445,20 +417,19 @@ max_friends = 20
#----------------------------------------------------------------------------#
# Set track=0 to disable tracking. Any other number will set number
# of seconds between sending tracking packets. This is OFF by default.
# of seconds between sending tracking packets. This is ON by default.
#track = 0
track = 60
# Tracking server(s)
# Use a comma delimited list of hostnames with optional UDP port numbers
# after colons. (port 6114 is the default for the newer tracking protocol)
#trackaddrs = "track.pvpgn.org,localhost:9999"
trackaddrs = "track.pvpgn.org,track.dreaming-bg.com,bntrack.darkwings.org,track.muleslow.net,bnet.mivabe.nl"
trackaddrs = "track.pvpgn.pro,track.pvpgn.org,bntrack.darkwings.org,bnet.mivabe.nl,track.eurobattle.net"
# Change these to match your system, for example:
location = "unknown"
description = "unknown"
url = "unknown"
url = "https://github.com/pvpgn/pvpgn-server"
contact_name = "a PvPGN user"
contact_email = "unknown"
@ -478,6 +449,11 @@ contact_email = "unknown"
# limit, NOT the concurrent user limit (for that see next option)
max_connections = 1000
# Set maximum amount of packets in client packet queue
# If limit is reached, client connection will be dropped
# Set to 0 to disable
packet_limit = 1000
# Maximum number of concurrent users (0 means unlimited).
max_concurrent_logins = 0

View file

@ -61,14 +61,14 @@ userlogdir = var\userlogs
i18ndir = conf\i18n
issuefile = conf\bnissue.txt
channelfile = conf\channel.conf
adfile = conf\ad.conf
adfile = conf\ad.json
topicfile = conf\topics.conf
ipbanfile = conf\bnban.conf
transfile = conf\address_translation.conf
mpqfile = conf\autoupdate.conf
logfile = var\bnetd.log
realmfile = conf\realm.conf
versioncheck_file = conf\versioncheck.conf
versioncheck_file = conf\versioncheck.json
mapsfile = conf\bnmaps.conf
xplevelfile = conf\bnxplevel.conf
xpcalcfile = conf\bnxpcalc.conf
@ -150,6 +150,7 @@ allow_d2cs_setname = true
# the "filedir" directory specified above.
iconfile = "icons.bni"
war3_iconfile = "icons-WAR3.bni"
star_iconfile = "icons_STAR.bni"
# #
##############################################################################
@ -188,19 +189,6 @@ war3_iconfile = "icons-WAR3.bni"
# Example: allowed_clients = war3,w3xp
allowed_clients = all
# If this option is enabled, the verification step is skipped if possible.
# This only works with clients < 109. It is useful because you no longer
# need any of the IX86AUTH?.MPQ and PMACAUTH?.MPQ files. Note that it will
# also skip over all the autoupdate checks effectively disabling it.
#
# If you disable this you must have one or more of the MPQ files. Otherwise
# clients will hang when they first connect because they are attempting to
# download them. The versioncheck can only be skipped for clients older
# than 109. Starting with version 109 the clients will always do version
# checking since they do not function properly if the server does not
# request it.
skip_versioncheck = true
# If you enable the version checks but want to allow clients that don't pass
# the checksum test then enable this.
allow_bad_version = true
@ -211,19 +199,6 @@ allow_bad_version = true
# is a good idea.
allow_unknown_version = true
# This defines how the exeinfo field in the versioncheck file is being
# checked. You can choose between no match at all [none] (default),
# exact match [exact], exact case-sensitive match [exactcase], dumb wildcard
# match [wildcard], and parsed value comparison [parse].
# NOTE: [parse] needs the mktime() function and might therefore not work on
# every system.
version_exeinfo_match = none
# If you have choosen [parse] above, this is the tolerance with which
# the time can differ. The value must be given in seconds. If it's 0 this
# check is disabled.
version_exeinfo_maxdiff = 0
# #
##############################################################################
@ -425,20 +400,19 @@ max_friends = 20
#----------------------------------------------------------------------------#
# Set track=0 to disable tracking. Any other number will set number
# of seconds between sending tracking packets. This is OFF by default.
# of seconds between sending tracking packets. This is ON by default.
#track = 0
track = 60
# Tracking server(s)
# Use a comma delimited list of hostnames with optional UDP port numbers
# after colons. (port 6114 is the default for the newer tracking protocol)
#trackaddrs = "track.pvpgn.org,localhost:9999"
trackaddrs = "track.pvpgn.org,track.dreaming-bg.com,bntrack.darkwings.org,track.muleslow.net,bnet.mivabe.nl"
trackaddrs = "track.pvpgn.pro,track.pvpgn.org,bntrack.darkwings.org,bnet.mivabe.nl,track.eurobattle.net"
# Change these to match your system, for example:
location = "unknown"
description = "unknown"
url = "unknown"
url = "https://github.com/pvpgn/pvpgn-server"
contact_name = "a PvPGN user"
contact_email = "unknown"
@ -458,6 +432,11 @@ contact_email = "unknown"
# limit, NOT the concurrent user limit (for that see next option)
max_connections = 1000
# Set maximum amount of packets in client packet queue
# If limit is reached, client connection will be dropped
# Set to 0 to disable
packet_limit = 1000
# Maximum number of concurrent users (0 means unlimited).
max_concurrent_logins = 0

Binary file not shown.

View file

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<meta>
<language tag="bgBG">Bulgarian</language>
<countries>
<country>BGR</country>
</countries>
</meta>
</root>

View file

@ -2,6 +2,7 @@
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<meta>
<language tag="enUS">English</language>
<countries></countries>
<authors>
<author name="nomad" email="nomad@example.com" />
</authors>

View file

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<meta>
<language tag="csCZ">Czech</language>
<countries>
<country>CZE</country>
</countries>
</meta>
</root>

621
conf/i18n/deDE/bnhelp.conf Normal file
View file

@ -0,0 +1,621 @@
##############################################################################
# bnhelp - This Help File is used for describing the commands to the user #
#----------------------------------------------------------------------------#
# Entries are separated by a percent sign (%) at the beginning of the line. #
# The commands that correspond with the entry should follow the % on the #
# same line. #
# #
# You can enter comments by starting a line with #. Comments extend to the #
# end of the line. #
# Tabs replaces with 3 spaces. #
# Empty lines are ignored. #
# #
##############################################################################
%whois whereis where
--------------------------------------------------------
/whois <Spieler> (oder auch: /where /whereis)
Zeigt an wo ein <Spieler> sich gerade auf dem Server befindet.
Beispiel: /whois nomad
%msg whisper m w
--------------------------------------------------------
/whisper <Spieler> <Nachricht> (oder auch: /w /m /msg)
Sendet eine private <Nachricht> an <Spieler>
Beispiel: /whisper nomad Wie geht es dir?
%ignore squelch
--------------------------------------------------------
/squelch <Benutzername> (oder auch: ignore, siehe aauch: /unsquelch)
Blockiert weitere Nachrichten von <Benutzername>
Beispiel: /squelch nomad
%unignore unsquelch
--------------------------------------------------------
/unsquelch <Spieler> (oder auch: /unignore)
Erlaubt einem vorher geblocktem <Spieler>, normal mit dir zu reden.
Beispiel: /unsquelch nomad
%away
--------------------------------------------------------
/away [Nachricht]
Zeigt den Benutzern, die dich anflüstern eine [Nachricht] an. Nutze den /away Befehl nochmals ohne [Nachricht], um diese Funktion abzuschalten.
Beispiel: /away beim Abendessen
%dnd
--------------------------------------------------------
/dnd [Nachricht]
Bei dir wird kein Chat mehr auf dem Bildschirm gezeigt. Benutze den Befehl nochmals ohne [Nachricht], um ihn aufzuheben.
Beispiel: /dnd Ich bin im Spiel und möchte keinen Chat bekommen.
%who
--------------------------------------------------------
/who <Kanal>
Zeigt eine Liste der Nutzer in <Kanal>
Beispiel: /who Moderated Support
%stats astat
--------------------------------------------------------
/stats [Spieler] [client] (oder auch: /astat)
Zeigt die Gewinn/Verlust Statisitk eines [Spielers].
Example: /stats nomad
%status users
--------------------------------------------------------
/users [Spieletag] (oder auch: /status)
Zeigt die Anzahl der User, die mit dem Server verbunden sind.
Beispiel: /users W3XP
%time
--------------------------------------------------------
/time
Zeigt den aktuellen Server und deine lokale Zeit an.
%channel join j
--------------------------------------------------------
/channel <Kanal> (oder auch: /join /j)
Du betrittst den <Kanall>
Beispiel: /channel Moderated Support
%rejoin
--------------------------------------------------------
/rejoin (oder auch: /resign)
Entfernt deinen Status als Kanal Operator.
%me emote
--------------------------------------------------------
/me <Nachricht> (oder auch: /emote)
Zeigt deinen Namen und eine <Nachricht> in einer anderen Farbe.
Example: /emote will ein Spiel spielen.
%kick
--------------------------------------------------------
/kick <Spieler>
kickt <Spieler> aus dem Kanal.
Beispiel: /kick nomad
%ban
--------------------------------------------------------
/ban <Spieler> (siehe auch: /unban)
Bannt <Spieler> aus dem Kana und hindert ihn daran, zurückzukommen.
Beispiel: /ban nomad
%unban
--------------------------------------------------------
/unban <Spieler>
Erlaubt einem gebannten <Spieler>, in den Kanal zurückzukehren.
Beispiel: /unban nomad
%serverban
--------------------------------------------------------
/serverban <Spieler> (siehe auch: /unban)
Bannt die IP eines <Spielers> und sperrt seinen Zugang.
Beispiel: /serverban nomad
%ipscan
--------------------------------------------------------
/ipscan <Name or IP-Addresse>
Findet alle zur Zeit eingeloggten Benutzer mit dem gesuchten <Namen> oder <IP-Addresse>.
Beispiel: /ipscan 127.0.0.1
Beispiel: /ipscan nomad
%whoami
--------------------------------------------------------
/whoami
Zeigt an, wo du dich auf dem Server befindest.
%uptime
--------------------------------------------------------
/uptime
Zeigt an, seit wann der Server laeuft.
%version
--------------------------------------------------------
/version
Zeigt die Serverversion an.
%lusers
--------------------------------------------------------
/lusers
Zeigt die Lister der Spieler, die vom Server gebannt wurden.
%games
--------------------------------------------------------
/games [Spieletag] [Schwierigkeit]
Zeigt eine Liste der Onlinespiele.
Setze die [Schwierigkeit] nur für for Diablo Spiele(norm|night|hell)
--------------------------------------------------------
/games all
Zeigt eine Liste aller Spiele.
/games l[obby]
Zeigt eine Liste der Spiele in der Lobby.
%channels chs
--------------------------------------------------------
/channels [Spieletag] (oder auch: /chs)
Zeigt eine Liste aller Kanäle für diesen [Spieletag].
--------------------------------------------------------
/channels all
Zeigt eine Liste aller Kanäle.
%connections con
--------------------------------------------------------
/connections (oder auch: /con)
Zeigt eine Liste der Verbindungen an.
%finger
--------------------------------------------------------
/finger <Spieler>
Zeigt genaue Informationen über <Spieler> an.
Beispiel: /finger nomad
%admins
--------------------------------------------------------
/admins
Zeigt eine Liste der zur Zeit eingeloggten Admins an.
%reply r
--------------------------------------------------------
/reply <message> (alias: /r)
Antwortet dem letzten Spieler, der dich mit einer <Nachricht> angeflüstert hat.
Beispiel: /r Hi Kumpel!
%announce ann
--------------------------------------------------------
/announce <Nachricht> (oder auch: /ann)
Schickt eine <Nachricht> an alle.
Beispiel: /ann Hallo zusammen!
%realmann
--------------------------------------------------------
/realmann <Nachricht>
Schickt eine <Nachicht> an alle in der aktuellen Diablo2 Instanz.
Beispiel: /realmann Hallo zusammen!
%alert
--------------------------------------------------------
/alert <Nachricht>
Zeigt eine Textbox mit deiner <Nachricht> an alle. Nutze \n um einen Absatz zu setzen.
Beispiel: /alert Hallo\nzusammen!
%news
--------------------------------------------------------
/news
Zeigt die Neuigkeiten an.
%logout quit exit
--------------------------------------------------------
/logout (alias: /quit /exit)
Trennt dich vom Server.
%kill
--------------------------------------------------------
/kill {<Benutzername>|#<socket>} [min]
Trennt <Spieler> vom Server und bannt die IP des Spielers für [min] Minuten.
Beispiel: /kill nomad 5
%killsession
--------------------------------------------------------
/killsession <SitzungsID> [min]
Trennt die Sitzung vom Server und bannt die zugehörige IP-Adresse für [min] Minuten.
Beispiel: /killsession 1 5
%watch
--------------------------------------------------------
/watch <Spieler>
Du wirst über <Spieler> benachrichtigt.
Beispiel: /watch nomad
%unwatch
--------------------------------------------------------
/unwatch <Spieler>
Du wirst nicht mehr über <Spieler> benachrichtigt.
Beispiel: /unwatch nomad
%watchall
--------------------------------------------------------
/watchall [Spieletag]
Du wirst über die Aktionen von allen benachrichtigt.
Beispiel: /watchall SEXP
%unwatchall
--------------------------------------------------------
/unwatchall [gametag]
Du wirst nicht mehr über die Aktionen von allen benachrichtigt.
Example: /unwatchall SEXP
%gameinfo
--------------------------------------------------------
/gameinfo <Spielename>
Zeigt Informationen über <Spielename>.
Beispiel: /gameinfo FS 1v1!!!
%ladderactivate
--------------------------------------------------------
/ladderactivate
Kopiert aktuelle ladder Statistiken zu aktiven Ladder Statistiken
%ladderinfo
--------------------------------------------------------
/ladderinfo <Rang> [Spieletag]
Displays ladder information for <rank> of [gametag]
Zeigt Ladderinformationen für den <Rang> mi [Spieletag]
Beispiel: /ladderinfo 1000 SEXP
%timer
--------------------------------------------------------
/timer <Dauer> [Nachricht]
Zeigt [Nachricht] nach <Dauer> Sekunden.
Beispiel: /timer 60 eine Minute ist vergangen.
%netinfo
--------------------------------------------------------
/netinfo [Spieler]
Zeigt die Netzwerkinformationen von [Spieler].
Beispiel: /netinfo nomad
%addacct
--------------------------------------------------------
/addacct <Spieler> <Passwort>
Erschafft einen neuen account mit Namen <Spieler> mit dem gewählten <Passwort>.
Beispiel: /addacct nomad password
%chpass
--------------------------------------------------------
/chpass [<Spieler>] <Passwort> - ändert das Passwort von <Spieler>
Ändert [<Spieler>]s Passwort zu <Passwort>.
Wenn du [<Spieler>] leer lässt, wird das Passwort zu deinem account geändert.
Beispiel: /chpass nomad password
%quota
--------------------------------------------------------
/quota
Zeigt, wieviel du geschrieben hast.
%shutdown
--------------------------------------------------------
/shutdown [Dauer]
Stellt die Shutdown Sequenz auf [Dauer] Sekunden, oder hebt sie auf, wenn du die [Dauer] auf 0 setzt.
Beispiel: /shutdown 300
%lock lockacct
--------------------------------------------------------
/lock <Spieler> [Stunden] [Grund] (oder auch: /lockacct)
Sperrt <Spieler>s account, damit er sich nicht einloggen kann.
Setze [Stunden] = 0 um dauerhaft zu bannen.
Beispiel: /lock nomad 0 bye noob!
%unlock unlockacct
--------------------------------------------------------
/unlock <Spieler> (oder auch: /unlockacct)
Entsperrt <Spieler>s account, damit er sich wieder einloggen kann.
Beispiel: /unlock nomad
%mute muteacct
--------------------------------------------------------
/mute <Spieler> [Stunden] [Grund] (oder auch: /muteacct)
Schaltet <Spieler>s account auf stumm, so dass er in Kanälen nichts schreiben kann.
Setze [Stunden] = 0 um den Account dauerhaft auf stumm zu schalten.
Beispiel: /mute nomad 6 lass den spam!
%unmute unmuteacct
--------------------------------------------------------
/unmute <Spieler> (oder auch: /unmuteacct)
Hebt die Stummschaltung von <Spieler>s account auf, damit er wieder in Kanälen schreiben kann.
Beispiel: /unmute nomad
%friends f
--------------------------------------------------------
/friends <Befehl> [Optionen] (oder auch: /f)
--------------------------------------------------------
/friends add <Nutzername>
Fügt <Nutzername> deiner Freundesliste hinzu.
/friends del <Nutzername>
Entfernt <Nutzername> von deiner Freundesliste.
/friends promote <Nutzername>
Befördert <Nutzername> eine Zeile in deiner Freundesliste.
/friends demote <Nutzername>
Stuft <Nutzername> eine Zeile in deiner Freundesliste herab.
/friends list
Zeigt deine Freundesliste.
/friends online
Zeigt die Liste deiner Freunde, die online sind.
/friends msg <Text>
Flüstert <Text> an alle deine Freunde, die online sind.
%mail
--------------------------------------------------------
/mail <Befehl> [Optionen]
--------------------------------------------------------
/mail s[end] <Empfaenger> <Nachricht>
Sendet einen Brief an <Empfänger> mit der <Nachricht>.
/mail r[ead] [index]
Liesst den Brief [index]
/mail del[ete] {all|<index>}
Löscht Briefe im <index> oder [all]e Briefe.
%flag
--------------------------------------------------------
/flag <Nummer>
Ein Reperaturwerkzeug für Symboltags.
%tag
--------------------------------------------------------
/tag <gamename>
Ein Reperaturwerkzeug für Klienttags.
%help
--------------------------------------------------------
/help [Befehl]
Zeigt die Hilfe zu [Befehl].
Beispiel: /help whisper
%ipban
--------------------------------------------------------
/ipban <Befehl> [Option] [Zeit]
--------------------------------------------------------
/ipban l[ist]
Zeigt eine Liste der gebannten IP-Adressen.
/ipban c[heck] <IP>
Überprüft ob die IP-Adresse <IP> gebannt ist.
/ipban d[el] <IP|index>
Loescht den Ban der IP Adresse <IP> oder den <index> dazu.
/ipban a[dd] <IP> [time]
Bannt IP Addresse <IP> für [Zeit] Minuten. [Zeit] = 0 - dauerhafter Bann.
%set
--------------------------------------------------------
/set <account> <Schlüssel> [Wert]
Setzt oder den Wert von <Schlüssel> für den account <account>, oder setzt ihn zurück.
Setze [Wert] = null um den Wert zurückzusetzen.
Beispiel: /set nomad BNET\auth\botlogin true
Beispiel: /set nomad Record\SEXP\0_wins 999
%motd
--------------------------------------------------------
/motd
Zeigt die MOTD.
%tos
--------------------------------------------------------
/tos /warranty /license
Zeigt die Endbenutzerbedingungen.
%admin
--------------------------------------------------------
/admin [+|-]<Spieler>
Befördert/degradiert <Spieler> zum/als Server Administrator.
Beispiel: /admin +nomad
%rehash
--------------------------------------------------------
/rehash <Modus>
Zwingt den Server, eine spezifische Konfig. zu laden. Setze auf "alle" um alle Konfigs neu zu laden.
<Modus> = alle | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua
%clan
--------------------------------------------------------
/clan <Befehl> [Option]
--------------------------------------------------------
/clan create <Clantag> <Clanname>
Erschafft einen neuen Clan (max <Clantag> Länge = 4; Freizeichen sind erlaubt im <Clanname>n)
Befehle für clan Mitglieder:
/clan m[sg] <Nachricht> (oder auch: [w]hisper)
Fluestert eine Nachricht an alle deine Clan Mitglieder
/clan inv[ite] <Nutzername>
Laed <Nutzername> in deinen Clan ein.
/clan inv[ite] get
Zeigt, in welchen Clan du eingeladen wurdest.
/clan inv[ite] accept
Akzeptiert eine Clan Einladung.
/clan inv[ite] decline
Lehnt eine Clan Einladung ab.
Befehle für Clanleader:
/clan motd <Nachricht>
Updated die Clan "Nachricht des Tages".
/clan pub[lic] (oder auch: pub)
Öffnet den Clan Kanal für andere.
/clan priv[ate] (oder auch: priv)
Schliesst den Clan Kanal,nur Mitglieder haben zutritt.
/clan dis[band]
Löst den Clan Kanal auf.
%ping p latency
--------------------------------------------------------
/ping (oder auch: /p /latency)
Zeigt deinen Ping zum Server.
%command_groups cg
--------------------------------------------------------
/command_groups <Befehl> <Nutzer> [Gruppen] (oder auch: /cg)
--------------------------------------------------------
/cg list <user>
Zeigt die Befehlgruppe zu <Nutzer>.
/cg add <Nutzer> <Gruppe(n)>
Fügt eine Befehlgruppe(n) zu <Nutzer> hinzu.
/cg del <Nutzer> <Gruppe(n)>
Löscht Befehlgruppe(n) von <Nutzer>.
%operator
--------------------------------------------------------
/operator [+|-]<Spieler> (oder auch: /op)
Befoerdert/degradiert <Spieler> zum/vom Server Operator.
Beispiel: /operator +nomad
%aop
--------------------------------------------------------
/aop <Nutzername>
Befördert <Nutzername> zum Kanal Administrator.
Beispiel: /aop nomad
%op
--------------------------------------------------------
/op <Nutzername>
Befördert <Nutzername> zum Kanal Operator.
Beispiel: /op nomad
%deop
--------------------------------------------------------
/deop <Nutzername>
Degradiert <Nutzername> als Kanal Administrator oder Operator.
Beispiel: /deop nomad
%tmpop
--------------------------------------------------------
/tmpop <Nutzername>
Befördert <Nutzername> zum vorübergehenden Kanal Operator.
Beispiel: /tmpop <username>
%vop
--------------------------------------------------------
/vop <Nutzername>
Fügt <Nutzername> der VOP Liste hinzu.
Beispiel: /vop nomad
%voice
--------------------------------------------------------
/voice <Nutzername>
Gibt vorübergehend Voice Rechte an <Nutzername>.
Beispiel: /voice nomad
%devoice
--------------------------------------------------------
/devoice <username>
Entfernt <Nutzername> von der VOP Liste und vorübergehende Voice Rechte.
Beispiel: /devoice nomad
%topic
--------------------------------------------------------
/topic [Nachricht]
Setzt oder zeigt die aktuelle Kanal Überschrift.
Beispiel: /topic Supported is given in this channel...\n(some text on a new line)
%moderate
--------------------------------------------------------
/moderate
schaltet den aktuellen Moderationsstatus des Kanals um.
%clearstats
--------------------------------------------------------
/clearstats <Spieler> <Klienttag>
Löscht die Statistik von <Spieler>s <Klienttag> , dabei kann <Klienttag> jeder zulässige Klient oder JEDER Klient sein.
Unterstützte Klienten: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP
Beispiel: /clearstats nomad SEXP
%find
--------------------------------------------------------
/find <Unterbegriff>
Findet einen Nutzer mit dem <Teilbegriff> in seinem Nutzernamen. Der <Teilbegriff> MUSS in Kleinbuchstaben stehen!
%save
--------------------------------------------------------
/save
Zwingt den Server, Änderungen am Account und Clan Änderungen in der Datenbank zu speichern.
%icon
--------------------------------------------------------
/icon [Name]
Setzt ein spezifisches Icon für normale Nutzer.
Nutze /icon ohne [Name] um die Liste der verfügbaren Icons in deinem Vorrat anzuzeigen.
--------------------------------------------------------
Syntax fuer Operatoren/Admins:
/icon a[dd] <Nutzername> <icon>
Fügt ein Icon dem Vorrat eines Nutzers hinzu.
/icon d[el] <Nutzername> <icon>
Entfernt ein Icon aus dem Vorrat eines Nutzers
/icon s[et] <Nutzername> <icon>
Setzt ein spezifisches Icon für den Nutzer, ohne es seinem Vorrat hinzuzufügen.
/icon l[ist] <Nutzername>
Zeigt die Icons im Vorrat des Nutzers an.
/icon l[ist]
Zeigt die auf dem Server vorrätigen Icons an, die Nutzern zugewiesen werden können.
%language /lang
--------------------------------------------------------
/lang [code]
Stellt deine Sprache auf eine andere Übersetzung um:
%quiz
--------------------------------------------------------
/quiz <Befehl> [Option]
Trivia Quiz Spiel
--------------------------------------------------------
/quiz start <Name>
Startet ein Spiel mit der Datenbak <Name> im aktuellen Kanal
/quiz stop
Beendet das Quiz erzwungen.
/quiz stats [Nutzername]
Zeigt die Quiz Statistik für [Nutzername]
/quiz stats
Zeigt die Bestenliste des Quiz
Nutzername

View file

@ -2,11 +2,11 @@
%ILaufende Version %v auf %h.
%IDer Server ist von %H gehostet
%I
%IEs sind %a Benutzerprofile auf dem server.
%IEs sind %a Benutzerprofile auf dem Server.
%IAktuell sind %U Spieler in %G Spielen von %N,
%Iund %u Spieler spielen %g Spiele und chatten in %c Channels.
%IEin Problem mit den Kommandos? Schreibe /help und
%Ilerne mehr über die Kommandos.
%Iund %u Spieler spielen %g Spiele und chatten in %c Kanälen.
%IEin Problem mit den Befehlen? Schreibe /help und
%Ilerne mehr über die Befehle.
%IType /language to switch translation.
%I
%M%m
%M%m

View file

@ -0,0 +1,15 @@
PvPGN Bnet Emulation Chat Hilfe Befehle
Neue Befehle:
nutze /f help für Hilfe mit der Freundesliste.
nutze /users um zu sehen, welche Nutzer online sind.
nutze /w or /msg <Nutzername> um Nutzer anzuflüstern.
nutze /join <Kanal> um einem Kanal beizutreten
Fuerr Chan Ops:
nutze /ban <Nutzername> um einen Nutzer aus dem Kanal zu bannen.
nutze /kick <Nutzername> um einen Nutzer aus dem Kanal zu kicken.
Für eine genauere Hilfe schreibe: /help

2078
conf/i18n/deDE/common.xml Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,20 @@
Sie sind zur Zeit mit einem PvPGN Server (Player -vs- Player Gaming Network) verbunden.
PvPGN Allgemeine Geschaeftsbedingungen:
PvPGN ist ein Battle.net(R) Emulationsserver und ist auf keine Weise verbunden mit bnetd, warforge, oder Blizzard Entertainment(R).
PvPGN wird zur Verfügung gestellt "wie er ist" ohne Gewährleistungen jedweder Art.
Wir unterstützen Softwarepiraterie nicht und halten Sie an, eine legale Kopie der Spiele zu erwerben, die Sie auf unserem Server spielen möchten.
1. Inhalte, die auf PvPGN gefunden werden.
PvPGN unterstützt oder garantiert nicht für die Genauigkeit, den Wahrheitsgehalt oder die Zuverlässigkeit jedweder Informationen, darunter auch Meinungen und Ratschläge, die auf oder über PvPGN vermittelt werden. Jede und alle Aussagen, die in Foren, Chatverläufen oder in Spielen gemacht werden, geben nur die Meinung ihrer Urheber wieder.
2. Ausschluss von Gewährleistung.
PvPGN wird gestellt "wie er ist" ohne Gewährleistungen irgendeiner Art. PvPGN gewährleistet nicht, dass ihr Programm ungestört und fehlerfrei läuft.
3. begrenzte Haftbarkeit
PvPGN ist in keiner Weise haftbar für Verlust oder Schaden jedweder Art, der aus der Benutzung von PvPGN resultiert. Das schliesst ein, ist aber nicht begrenzt auf, Verlust von Geschäftswerten, Computerfehlern oder -Versagen und jedwede Art von Schaden, Verlust, sei er kommerziell oder privat.
Battle.net(R) und Blizzard Entertainment(R) sind Warenzeichen oder eingetragene Warenzeichen von Blizzard Entertainment in den Vereinigten Staaten von Amerika und oder anderen Staaten.
Davon abgesehen... Viel Spaß...
PvPGN Projekt Seite: http://pvpgn.berlios.de/

View file

@ -0,0 +1,21 @@
Sie sind zur Zeit mit einem PvPGN Server (Player -vs- Player Gaming Network) verbunden.
PvPGN Allgemeine Geschaeftsbedingungen:
PvPGN ist ein Battle.net(R) Emulationsserver und ist auf keine Weise verbunden mit bnetd, warforge, oder Blizzard Entertainment(R).
PvPGN wird zur Verfügung gestellt "wie er ist" ohne Gewährleistungen jedweder Art.
Wir unterstützen Softwarepiraterie nicht und halten Sie an, eine legale Kopie der Spiele zu erwerben, die Sie auf unserem Server spielen möchten.
11. Inhalte, die auf PvPGN gefunden werden.
PvPGN unterstützt oder garantiert nicht für die Genauigkeit, den Wahrheitsgehalt oder die Zuverlässigkeit jedweder Informationen, darunter auch Meinungen und Ratschläge, die durch oder über PvPGN vermittelt werden. Jede und alle Aussagen, die in Foren, Chatverläufen oder in Spielen gemacht werden, geben nur die Meinung ihrer Urheber wieder.
2. Ausschluss von Gewaehrleistung.
PvPGN wird gestellt "wie er ist" ohne Gewährleistungen irgendeiner Art. PvPGN gewährleistet nicht, dass ihr Programm ungestört und fehlerfrei läuft.
3. begrenzte Haftbarkeit
PvPGN ist in keiner Weise haftbar für Verlust oder Schaden jedweder Art, der aus der Benutzung von PvPGN resultiert. Das schliesst ein, ist aber nicht begrenzt auf, Verlust von Geschäftswerten, Computerfehlern oder -Versagen und jedwede Art von Schaden, Verlust, sei er kommerziell oder privat.
Battle.net(R) und Blizzard Entertainment(R) sind Warenzeichen oder eingetragene Warenzeichen von Blizzard Entertainment in den Vereinigten Staaten von Amerika und oder anderen Staaten.
Davon abgesehen... Viel Spaß...
PvPGN Projekt Seite: http://pvpgn.berlios.de/

11
conf/i18n/deDE/w3motd.txt Normal file
View file

@ -0,0 +1,11 @@
|c00FF0000Welcome |c00FF9933to |c0000CCFFthe |c00FF66FF%s |c0000CC00Version |c009999FF%v |c00FFFFFF
Es sind zur Zeit %U Nutzer in %G Spielen von %N und %u Nutzer spielen %g Spiele and chatten in %c Kanälen.
Dieser Text ist nicht sichtbar wegen der 11 Zeilen Begrenzung!

View file

@ -2,6 +2,27 @@
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<meta>
<language tag="esES">Spanish</language>
<countries>
<country>ESP</country>
<country>ARG</country>
<country>BOL</country>
<country>CHL</country>
<country>COL</country>
<country>CRI</country>
<country>DOM</country>
<country>ECU</country>
<country>SLV</country>
<country>GTM</country>
<country>HND</country>
<country>MEX</country>
<country>NIC</country>
<country>PAN</country>
<country>PRY</country>
<country>PER</country>
<country>PRI</country>
<country>URY</country>
<country>VEN</country>
</countries>
<authors>
<author name="plissken2097" email="formato_ahorro@hotmail.com" />
</authors>

View file

@ -1,21 +1,21 @@
Actualmente está conectado al Servidor PvPGN ( Player -vs- Player Gaming Network)
TÉRMINOS DE USO del PvPGN:
PVPGN es una emulación del servidor de Battle.net(r) y de ninguna manera afiliado con bnetd, warforge o Blizzard Entertainment (R).
PVPGN está disponible al público "tal y como es" sin ningún tipo de garantias.
No apoyamos la idea de software Pirata y incitamos a todos a obtener una copia legal de cualquiera de los juegos disponibles en nuestros servidores.
1. Información sobre PvPGN.
PvPGN no aprueba ni se apela a la precisión, veracidad o fiabilidad de cualquier información ( incluídas declaraciones sobre opinión o consejos) dada en o por cualquier medio de PvPGN. Cualquiera y todas las declaraciones hechas en foros, chat o durante juegos reflejan solamente el parecer de su autor.
2. Exclusión de Garantía.
PvPGN está disponible al público "tal y como es" sin ningún tipo de garantias. PvPGN no garantiza que su programa sea ininterrumpido o libre de errores.
3. Limitaciones de Responsabilidad.
PvPGN es de ninguna manera responsable por pérdidas o daños de cualquier tipo al usar PvPGN, incluyendo pero no limitándose a, pérdida de libre voluntad, paro laboral, fallos o defectos en los ordenadores, o cualquier y todos otros tipos de daños o perdidas, comerciales o de cualquier otro tipo.
Battle.net(R) y Blizzard Entertainment(R) son marcas registrada de Blizzard Entertainment en los E.U. y/o otros países.
Aparte de todo esto... Disfrutar jugando..
PvPGN Project Page: http://pvpgn.berlios.de/
Actualmente está conectado al Servidor PvPGN ( Player -vs- Player Gaming Network)
TÉRMINOS DE USO del PvPGN:
PVPGN es una emulación del servidor de Battle.net(r) y de ninguna manera afiliado con bnetd, warforge o Blizzard Entertainment (R).
PVPGN está disponible al público "tal y como es" sin ningún tipo de garantias.
No apoyamos la idea de software Pirata y incitamos a todos a obtener una copia legal de cualquiera de los juegos disponibles en nuestros servidores.
1. Información sobre PvPGN.
PvPGN no aprueba ni se apela a la precisión, veracidad o fiabilidad de cualquier información ( incluídas declaraciones sobre opinión o consejos) dada en o por cualquier medio de PvPGN. Cualquiera y todas las declaraciones hechas en foros, chat o durante juegos reflejan solamente el parecer de su autor.
2. Exclusión de Garantía.
PvPGN está disponible al público "tal y como es" sin ningún tipo de garantias. PvPGN no garantiza que su programa sea ininterrumpido o libre de errores.
3. Limitaciones de Responsabilidad.
PvPGN es de ninguna manera responsable por pérdidas o daños de cualquier tipo al usar PvPGN, incluyendo pero no limitándose a, pérdida de libre voluntad, paro laboral, fallos o defectos en los ordenadores, o cualquier y todos otros tipos de daños o perdidas, comerciales o de cualquier otro tipo.
Battle.net(R) y Blizzard Entertainment(R) son marcas registrada de Blizzard Entertainment en los E.U. y/o otros países.
Aparte de todo esto... Disfrutar jugando..
PvPGN Project Page: http://pvpgn.berlios.de/

15
conf/i18n/frFR/common.xml Normal file
View file

@ -0,0 +1,15 @@
<?xml version="1.0"?>
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<meta>
<language tag="frFR">French</language>
<countries>
<country>FRA</country>
<country>BEL</country>
<country>CAN</country>
<country>FRA</country>
<country>LUX</country>
<country>MCO</country>
<country>CHE</country>
</countries>
</meta>
</root>

10
conf/i18n/itIT/common.xml Normal file
View file

@ -0,0 +1,10 @@
<?xml version="1.0"?>
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<meta>
<language tag="itIT">Italian</language>
<countries>
<country>ITA</country>
<country>CHE</country>
</countries>
</meta>
</root>

View file

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<meta>
<language tag="jpJA">Japanese</language>
<countries>
<country>JPN</country>
</countries>
</meta>
</root>

View file

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<meta>
<language tag="koKR">Korean</language>
<countries>
<country>KOR</country>
</countries>
</meta>
</root>

View file

@ -0,0 +1,21 @@
현재 PvPGN 서버를 연걸했습니다. (플레이어 대 플레이어 게임잉 네트워크)
PvPGN 조건:
PvPGN은 배틀넷 (Battle.net®) 에물레이션 서버 라고 bnetd, warforge, Blizzard Entertainment과 제휴하고 있지 않다.
PvPGN이 그대로 제공하고 보증서를 없다.
불법 복제된 소프트웨어의 사용을 지지하지 않다. 우리의 서버들에서 게임을 하려고 합법적인 버전을 구입하세요.
1. Information found on PvPGN.
PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author.
2. Disclaimer of Warrenty.
PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free.
3. Limitations of Liability
PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise.
Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries.
Besides all this... Happy gaming..
PvPGN Project Page: http://pvpgn.berlios.de/

10
conf/i18n/nlNL/common.xml Normal file
View file

@ -0,0 +1,10 @@
<?xml version="1.0"?>
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<meta>
<language tag="nlNL">Dutch</language>
<countries>
<country>NLD</country>
<country>BEL</country>
</countries>
</meta>
</root>

View file

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<meta>
<language tag="plPL">Polish</language>
<countries>
<country>POL</country>
</countries>
</meta>
</root>

10
conf/i18n/ptBR/common.xml Normal file
View file

@ -0,0 +1,10 @@
<?xml version="1.0"?>
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<meta>
<language tag="ptBR">Portuguese</language>
<countries>
<country>BRA</country>
<country>PRT</country>
</countries>
</meta>
</root>

View file

@ -1,12 +1,12 @@
%EПривет %l, добро пожаловать на %s!
%IВерсия сервера %v.
%IСервер расположен у %H (%h)
%IСервер версии %v на %h.
%IСервер расположен на %H (%h)
%I
%IНа сервере зарегистрировано %a аккаунтов.
%IСейчас %G игр и %U игроков в %N
%Iиз них %u находятся в %g играх и общаются на %c каналах.
%IПроблемы с использованием команды? Введите /help, чтобы
%Iузнать больше о командах чата.
%IНаберите /language, чтобы переключить язык перевода.
%I
%IВведите /help для получения помощи по командам чата
%IType /language to switch translation.
%I
%M%m
%M%m

View file

@ -2,14 +2,14 @@ PvPGN Bnet Emulation Chat Help Commands
Новые команды:
наберите /f help для вызова справки списке друзей
наберите /f help для вызова справки по списку друзей
наберите /users для просмотра пользоватей в онлайне
наберите /w или /msg <имяпользователя> для личного сообщения
наберите /w или /msg <имя_пользователя> для личного сообщения
наберите /join <канал> для присоединения к каналу
Для операторов каналов:
наберите /ban <имяпользователя> чтобы забанить игрока на данном канале
наберите /kick <имяпользователя> чтобы выкинуть пользователя с этого канала
наберите /ban <имя_пользователя>, чтобы забанить игрока на данном канале
наберите /kick <имя_пользователя>, чтобы кикнуть пользователя с этого канала
Для дальнейшей помощи наберите: /help
Для более подробной справки наберите: /help

14
conf/i18n/ruRU/common.xml Normal file
View file

@ -0,0 +1,14 @@
<?xml version="1.0"?>
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<meta>
<language tag="ruRU">Russian</language>
<countries>
<country>RUS</country>
<country>UZB</country>
<country>TTT</country>
<country>UKR</country>
<country>AZE</country>
<country>ARM</country>
</countries>
</meta>
</root>

10
conf/i18n/svSE/common.xml Normal file
View file

@ -0,0 +1,10 @@
<?xml version="1.0"?>
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<meta>
<language tag="svSE">Swedish</language>
<countries>
<country>SWE</country>
<country>FIN</country>
</countries>
</meta>
</root>

View file

@ -1,21 +1,21 @@
You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network)
PvPGN TERMS OF USE:
PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R).
PvPGN is provided "as is" without warrenties of any kind.
We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers.
1. Information found on PvPGN.
PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author.
2. Disclaimer of Warrenty.
PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free.
3. Limitations of Liability
PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise.
Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries.
Besides all this... Happy gaming..
PvPGN Project Page: http://pvpgn.berlios.de/
You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network)
PvPGN TERMS OF USE:
PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R).
PvPGN is provided "as is" without warrenties of any kind.
We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers.
1. Information found on PvPGN.
PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author.
2. Disclaimer of Warrenty.
PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free.
3. Limitations of Liability
PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise.
Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries.
Besides all this... Happy gaming..
PvPGN Project Page: http://pvpgn.berlios.de/

10
conf/i18n/zhCN/common.xml Normal file
View file

@ -0,0 +1,10 @@
<?xml version="1.0"?>
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<meta>
<language tag="zhCN">Chinese Simplified</language>
<countries>
<country>CHN</country>
<country>SGP</country>
</countries>
</meta>
</root>

11
conf/i18n/zhTW/common.xml Normal file
View file

@ -0,0 +1,11 @@
<?xml version="1.0"?>
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<meta>
<language tag="zhTW">Chinese Traditional</language>
<countries>
<country>TWN</country>
<country>MCO</country>
<country>HKG</country>
</countries>
</meta>
</root>

View file

@ -30,6 +30,8 @@
# Enable icon sets below
custom_icons = true
# Command groups for master users who can manage icons of other users (allowed: 12345678)
master_commandgroups = 678
##############################################################################
@ -38,18 +40,18 @@ custom_icons = true
#----------------------------------------------------------------------------#
[W3XP]
solo_level = "Record\W3XP\solo_level"
solo_xp = "Record\W3XP\solo_xp"
solo_wins = "Record\W3XP\solo_wins"
solo_losses = "Record\W3XP\solo_losses"
team_level = "Record\W3XP\team_level"
team_xp = "Record\W3XP\team_xp"
team_wins = "Record\W3XP\team_wins"
team_losses = "Record\W3XP\team_losses"
ffa_level = "Record\W3XP\ffa_level"
ffa_xp = "Record\W3XP\ffa_xp"
ffa_wins = "Record\W3XP\ffa_wins"
ffa_losses = "Record\W3XP\ffa_losses"
solo_level = "Record\W3XP\solo\level"
solo_xp = "Record\W3XP\solo\xp"
solo_wins = "Record\W3XP\solo\wins"
solo_losses = "Record\W3XP\solo\losses"
team_level = "Record\W3XP\team\level"
team_xp = "Record\W3XP\team\xp"
team_wins = "Record\W3XP\team\wins"
team_losses = "Record\W3XP\team\losses"
ffa_level = "Record\W3XP\ffa\level"
ffa_xp = "Record\W3XP\ffa\xp"
ffa_wins = "Record\W3XP\ffa\wins"
ffa_losses = "Record\W3XP\ffa\losses"
username = "BNET\acct\username"
[icons]
@ -80,18 +82,18 @@ diablo DRTL
##############################################################################
# Starcraft icon set #
# Use Bni Icon Builder to edit icons.bni #
# https://github.com/HarpyWar/bni-icon-builder #
# https://github.com/pvpgn/bni-icon-builder #
#----------------------------------------------------------------------------#
[SEXP]
rating1 = "Record\SEXP\1_rating"
wins1 = "Record\SEXP\1_wins"
losses1 = "Record\SEXP\1_losses"
disconnects1 = "Record\SEXP\1_disconnects"
rating0 = "Record\SEXP\0_rating"
wins0 = "Record\SEXP\0_wins"
losses0 = "Record\SEXP\0_losses"
disconnects0 = "Record\SEXP\0_disconnects"
ladder_rating = "Record\SEXP\1\rating"
ladder_wins = "Record\SEXP\1\wins"
ladder_losses = "Record\SEXP\1\losses"
ladder_disconnects = "Record\SEXP\1\disconnects"
normal_rating = "Record\SEXP\0\rating"
normal_wins = "Record\SEXP\0\wins"
normal_losses = "Record\SEXP\0\losses"
normal_disconnects = "Record\SEXP\0\disconnects"
username = "BNET\acct\username"
[icons]
@ -111,8 +113,8 @@ username = "BNET\acct\username"
[stats]
{{username}}'s record:
Ladder games: [{{rating1->rank}}] {{rating1}} pts ({{wins1}}/{{losses1}}/{{disconnects1}})
Normal games: [{{rating0->rank}}] {{rating0}} pts ({{wins0}}/{{losses0}}/{{disconnects0}})
Ladder games: [{{ladder_rating->rank}}] {{ladder_rating}} pts ({{ladder_wins}}/{{ladder_losses}}/{{ladder_disconnects}})
Normal games: [{{normal_rating->rank}}] {{normal_rating}} pts ({{normal_wins}}/{{normal_losses}}/{{normal_disconnects}})
[/stats]
[iconstash]
@ -120,3 +122,88 @@ demon EYES
warcraft WAR3
diablo DRTL
[/iconstash]
##############################################################################
# Warcraft II icon set #
# Use Bni Icon Builder to edit icons.bni #
# https://github.com/pvpgn/bni-icon-builder #
#----------------------------------------------------------------------------#
[W2BN]
ironman_rating = "Record\W2BN\3\rating"
ironman_wins = "Record\W2BN\3\wins"
ironman_losses = "Record\W2BN\3\losses"
ironman_disconnects = "Record\W2BN\3\disconnects"
ladder_rating = "Record\W2BN\1\rating"
ladder_wins = "Record\W2BN\1\wins"
ladder_losses = "Record\W2BN\1\losses"
ladder_disconnects = "Record\W2BN\1\disconnects"
normal_rating = "Record\W2BN\0\rating"
normal_wins = "Record\W2BN\0\wins"
normal_losses = "Record\W2BN\0\losses"
normal_disconnects = "Record\W2BN\0\disconnects"
username = "BNET\acct\username"
[icons]
1000 n00b NOOB
1250 Chobo+ CHO1
1500 Chobo++ CHO2
1750 Chobo+++ CHO3
2000 Hasu+ HAS1
2300 Hasu++ HAS2
2650 Hasu+++ HAS3
3000 Gosu+ GOS1
3300 Gosu++ GOS2
3650 Gosu+++ GOS3
4000 Mega Gosu GOSU
5500 Father MEGA
[/icons]
[stats]
{{username}}'s record:
Ladder games: [{{ladder_rating->rank}}] {{ladder_rating}} pts ({{ladder_wins}}/{{ladder_losses}}/{{ladder_disconnects}})
Normal games: [{{normal_rating->rank}}] {{normal_rating}} pts ({{normal_wins}}/{{normal_losses}}/{{normal_disconnects}})
IronMan games: [{{ironman_rating->rank}}] {{ironman_rating}} pts ({{ironman_wins}}/{{ironman_losses}}/{{ironman_disconnects}})
[/stats]
[iconstash]
demon EYES
diablo DRTL
[/iconstash]
##############################################################################
# Diablo: Retail icon set #
# Use Bni Icon Builder to edit icons.bni #
# https://github.com/pvpgn/bni-icon-builder #
#----------------------------------------------------------------------------#
[DRTL]
class = "Record\DRTL\0\class"
level = "Record\DRTL\0\level"
dexterity = "Record\DRTL\0\dexterity"
magic = "Record\DRTL\0\magic"
vitality = "Record\DRTL\0\vitality"
strength = "Record\DRTL\0\strength"
gold = "Record\DRTL\0\gold"
diablo_kills = "Record\DRTL\0\diablo kills"
username = "BNET\acct\username"
[icons]
0 warrior DRTL
1 rogue DRTL
2 sorcerer DRTL
[/icons]
[stats]
{{username}}'s record:
level: {{level}}
class: {{class->rank}}
stats: {{strength}} str / {{magic}} mag / {{dexterity}} dex / {{vitality}} vit / {{gold}} gold
Diablo kills: {{diablo_kills}}
[/stats]
[iconstash]
demon EYES
[/iconstash]

View file

@ -26,15 +26,15 @@
"auth_botlogin varchar(6)","'false'"
"auth_operator varchar(6)","'false'"
"new_at_team_flag int","'0'"
"auth_lock varchar(1)","'0'"
"auth_lock_time int","'0'"
"auth_lock_reason varchar(128)","NULL"
"auth_mute varchar(1)","'0'"
"auth_mute_time int","'0'"
"auth_mute_reason varchar(128)","NULL"
"auth_lock varchar(6)","'false'"
"auth_locktime int","'0'"
"auth_lockreason varchar(128)","NULL"
"auth_mute varchar(6)","'false'"
"auth_mutetime int","'0'"
"auth_mutereason varchar(128)","NULL"
"auth_command_groups varchar(16)","'1'"
"acct_lastlogin_time int","'0'"
"acct_lastlogin_owner varchar(16)","NULL"
"acct_lastlogin_owner varchar(128)","NULL"
"acct_lastlogin_clienttag varchar(4)","NULL"
"acct_lastlogin_ip varchar(16)","NULL"
:"DROP INDEX username"
@ -107,7 +107,7 @@
"W3XP_random_losses int","'0'"
"W3XP_teamcount int","'0'"
"W3XP_userselected_icon varchar(4)","NULL"
"W3XP_iconstash varchar(256)","NULL"
"W3XP_iconstash varchar(1024)","NULL"
"STAR_0_wins int","'0'"
"STAR_0_losses int","'0'"
"STAR_0_disconnects int","'0'"
@ -137,7 +137,7 @@
"SEXP_1_rank int","'0'"
"SEXP_1_high_rank int","'0'"
"SEXP_userselected_icon varchar(4)","NULL"
"SEXP_iconstash varchar(256)","NULL"
"SEXP_iconstash varchar(1024)","NULL"
"TSUN_solo_rank int","'0'"
"TSUN_solo_points int","'0'"
"TSUN_solo_wins int","'0'"

View file

@ -2,7 +2,7 @@
# some lines are commented out, cause they weren't installed by default in older versions
IX86ver1.mpq
ver-ix86-1.mpq
ver-IX86-1.mpq
PMACver1.mpq
XMACver1.mpq
bnserver-D2DV.ini
@ -10,4 +10,5 @@ bnserver-D2XP.ini
bnserver-WAR3.ini
bnserver.ini
icons-WAR3.bni
icons_STAR.bni
icons.bni

View file

@ -1,2 +1,2 @@
"Chat","This is the public chat channel. Feel free to chat..."
"Moderated Support","Support is provided in this channel..."
Chat This is the public chat channel. Feel free to chat...
Moderated Support Support is provided in this channel...

File diff suppressed because it is too large Load diff

1987
conf/versioncheck.json.in Normal file

File diff suppressed because it is too large Load diff

View file

@ -15,12 +15,9 @@
#cmakedefine HAVE_TERMIOS_H
#cmakedefine HAVE_SYS_TYPES_H
#cmakedefine HAVE_SYS_WAIT_H
#cmakedefine HAVE_SYS_IOCTL_H
#cmakedefine HAVE_STDINT_H
#cmakedefine HAVE_SYS_FILE_H
#cmakedefine HAVE_POLL_H
#cmakedefine HAVE_SYS_POLL_H
#cmakedefine HAVE_SYS_STROPTS_H
#cmakedefine HAVE_SYS_STAT_H
#cmakedefine HAVE_PWD_H
#cmakedefine HAVE_GRP_H
@ -34,83 +31,58 @@
#cmakedefine HAVE_SYS_EVENT_H
#cmakedefine HAVE_SYS_EPOLL_H
#cmakedefine HAVE_SYS_RESOURCE_H
#cmakedefine HAVE_PCAP_H
#cmakedefine HAVE_WINDOWS_H
#cmakedefine HAVE_WINSOCK2_H
#cmakedefine HAVE_WS2TCPIP_H
#cmakedefine HAVE_PROCESS_H
#cmakedefine SIZEOF_UNSIGNED_CHAR ${SIZEOF_UNSIGNED_CHAR}
#cmakedefine SIZEOF_UNSIGNED_SHORT ${SIZEOF_UNSIGNED_SHORT}
#cmakedefine SIZEOF_UNSIGNED_INT ${SIZEOF_UNSIGNED_INT}
#cmakedefine SIZEOF_UNSIGNED_LONG ${SIZEOF_UNSIGNED_LONG}
#cmakedefine SIZEOF_UNSIGNED_LONG_LONG ${SIZEOF_UNSIGNED_LONG_LONG}
#cmakedefine SIZEOF_SIGNED_CHAR ${SIZEOF_SIGNED_CHAR}
#cmakedefine SIZEOF_SIGNED_SHORT ${SIZEOF_SIGNED_SHORT}
#cmakedefine SIZEOF_SIGNED_INT ${SIZEOF_SIGNED_INT}
#cmakedefine SIZEOF_SIGNED_LONG ${SIZEOF_SIGNED_LONG}
#cmakedefine SIZEOF_SIGNED_LONG_LONG ${SIZEOF_SIGNED_LONG_LONG}
#cmakedefine HAVE_MMAP
#cmakedefine HAVE_GETHOSTNAME
#cmakedefine HAVE_GETTIMEOFDAY
#cmakedefine HAVE_SELECT
#cmakedefine HAVE_SOCKET
#cmakedefine HAVE_STRDUP
#cmakedefine HAVE_STRTOUL
#cmakedefine HAVE_INET_ATON
#cmakedefine HAVE_INET_NTOA
#cmakedefine HAVE_UNAME
#cmakedefine HAVE_RECV
#cmakedefine HAVE_SEND
#cmakedefine HAVE_RECVFROM
#cmakedefine HAVE_SENDTO
#cmakedefine HAVE_UNAME
#cmakedefine HAVE_FORK
#cmakedefine HAVE_GETPID
#cmakedefine HAVE_SIGACTION
#cmakedefine HAVE_SIGPROCMASK
#cmakedefine HAVE_SIGADDSET
#cmakedefine HAVE_SETPGID
#cmakedefine HAVE_FTIME
#cmakedefine HAVE_STRCASECMP
#cmakedefine HAVE_STRNCASECMP
#cmakedefine HAVE_STRICMP
#cmakedefine HAVE_STRNICMP
#cmakedefine HAVE_CHDIR
#cmakedefine HAVE_DIFFTIME
#cmakedefine HAVE_STRCHR
#cmakedefine HAVE_STRRCHR
#cmakedefine HAVE_INDEX
#cmakedefine HAVE_RINDEX
#cmakedefine HAVE_EPOLL_CREATE
#cmakedefine HAVE_FORK
#cmakedefine HAVE_FTIME
#cmakedefine HAVE_GETGID
#cmakedefine HAVE_GETGRNAM
#cmakedefine HAVE_GETHOSTBYNAME
#cmakedefine HAVE_GETHOSTNAME
#cmakedefine HAVE_GETLOGIN
#cmakedefine HAVE_GETOPT
#cmakedefine HAVE_GETPID
#cmakedefine HAVE_GETPWNAME
#cmakedefine HAVE_GETRLIMIT
#cmakedefine HAVE_GETSERVBYNAME
#cmakedefine HAVE_GETTIMEOFDAY
#cmakedefine HAVE_GETUID
#cmakedefine HAVE_IOCTL
#cmakedefine HAVE_KQUEUE
#cmakedefine HAVE__MKDIR
#cmakedefine HAVE_MKDIR
#cmakedefine HAVE_MMAP
#cmakedefine HAVE_PIPE
#cmakedefine HAVE_POLL
#cmakedefine HAVE_RECV
#cmakedefine HAVE_RECVFROM
#cmakedefine HAVE_SELECT
#cmakedefine HAVE_SEND
#cmakedefine HAVE_SENDTO
#cmakedefine HAVE_SETITIMER
#cmakedefine HAVE_SETPGID
#cmakedefine HAVE_SETPGRP
#cmakedefine HAVE_SETSID
#cmakedefine HAVE_SETUID
#cmakedefine HAVE_SIGACTION
#cmakedefine HAVE_SIGADDSET
#cmakedefine HAVE_SIGPROCMASK
#cmakedefine HAVE_SOCKET
#cmakedefine HAVE_STRCASECMP
#cmakedefine HAVE_STRDUP
#cmakedefine HAVE_STRICMP
#cmakedefine HAVE_STRNCASECMP
#cmakedefine HAVE_STRNICMP
#cmakedefine HAVE_STRSEP
#cmakedefine HAVE_UNAME
#cmakedefine HAVE_WAIT
#cmakedefine HAVE_WAITPID
#cmakedefine HAVE_PIPE
#cmakedefine HAVE_GETENV
#cmakedefine HAVE_IOCTL
#cmakedefine HAVE_SETSID
#cmakedefine HAVE_POLL
#cmakedefine HAVE_GETHOSTBYNAME
#cmakedefine HAVE_GETSERVBYNAME
#cmakedefine HAVE_GETLOGIN
#cmakedefine HAVE_GETPWNAME
#cmakedefine HAVE_GETGRNAM
#cmakedefine HAVE_GETUID
#cmakedefine HAVE_GETGID
#cmakedefine HAVE_SETUID
#cmakedefine HAVE_MKDIR
#cmakedefine HAVE__MKDIR
#cmakedefine MKDIR_TAKES_ONE_ARG
#cmakedefine HAVE_STRSEP
#cmakedefine HAVE_GETOPT
#cmakedefine HAVE_KQUEUE
#cmakedefine HAVE_SETITIMER
#cmakedefine HAVE_EPOLL_CREATE
#cmakedefine HAVE_GETRLIMIT
#cmakedefine HAVE_VSNPRINTF
#cmakedefine HAVE__VSNPRINTF
#cmakedefine HAVE_SNPRINTF
#cmakedefine HAVE__SNPRINTF
#cmakedefine HAVE_SETPGRP
#cmakedefine MKDIR_TAKES_ONE_ARG
#cmakedefine BNETD_DEFAULT_CONF_FILE "${BNETD_DEFAULT_CONF_FILE}"
#cmakedefine D2CS_DEFAULT_CONF_FILE "${D2CS_DEFAULT_CONF_FILE}"

View file

@ -1,29 +0,0 @@
PvPGN C++ conversion changelog
================================
What is this file all about?
----------------------------
As some of you might have noticed PvPGN is currently undergoing lots of changes
while the code is being converted from C to C++. This file is ment to keep
track of the changes made - and possible implications to users/admins.
Changes:
--------
bnetd/handle_irc*, bnetd_handle_wol*, bnetd/irc.*:
- merged WOL specific patch (better WOL support, cleaner code seperation)
bnetd/ladder*:
- no longer supports output of xml ladder files (at least so far)
bnetd/mail
bnetd/adbanner:
- requires changes in conf/ad.conf (unique id)
- requires changes in conf/ad.conf (language tag)
common/fdwatch*:
- no functional changes
compat/pdir
- converted to "Directory" class

View file

@ -1,32 +0,0 @@
PvPGN Win32 Dev-C++ Compile Instructions
This file explains how to compile PvPGN for Win32 using Dev-C++ ( 5.0 beta 9 (4.9.9.0) )
1) Download Dev-C++ 5.0 beta 9 (4.9.9.0) with Mingw/GCC 3.3.1 from the folling sites:
http://prdownloads.sourceforge.net/dev-cpp/devcpp4990setup.exe
2) Install Dev-C++ in a folder without any spaces in the path
3) From within Dev-C++ install the zlib-DevPak from the DevPacks.org community server (Tools->Check for Updates/Packages)
4) Go into the Win32-Projects folder of the PvPGN sources
Simply double-click on any of the *.dev files to fire up Dev-C++ and use Execute->Compile to build the binary
5) The resulting exe file will be in the bin directory and you can use it with the other files from the latest PvPGN release.
Notes for MYSQL/PGSQL/SQLITE3/ODBC Support:
support with Dev-C++ still unsupported/untested
Common problems and Solutions:
==============================
Fatal: 'all-before' does not exist - don't know how to make it:
----------------------------------------------------------------
That happens when the wrong make.exe is invoked, usually the Borland one. It will usually leave a copyright notice in your compile log.
How to fix it? add the bin folder of your Dev-C++ (or MinGW) installation to the PATH environment variable, before any Borland path that might be there
For more details check: http://www14.brinkster.com/aditsu/dev-cpp-faq.html#allbefore
Complains about not being able to create Makefile or 'no rule to make target all':
-----------------------------------------------------------------------------------
Check size of pvpgn\src\win32\Makefile.win
If it's 0 bytes quit Dev-C++, delete the file and try to compile again

View file

@ -1,56 +0,0 @@
A step-by-step guide for building the SVN version of PvPGN using Visual Studio Professional
===========================================================================================
Requirements:
- CMake 2.4.7 ( http://www.cmake.org/files/v2.4/cmake-2.4.7-win32-x86.exe )
- Visual Studio 2005 Professional
(you can also use Visual C++ Express - but this will need additional
tweaking that is beyond the scope of this guide.)
- zlib ( http://www.winimage.com/zLibDll/zlib123dll.zip AND http://www.winimage.com/zLibDll/zlib123.zip )
- latest PvPGN sources from SVN (in this example I have them extracted under D:/svn/pvpgn/ )
Optional:
- MySQL ( http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.45-win32.zip/from/pick#mirrors )
(using the installer version will make thinks alot easier for you - trust me on this)
- PostgreSQL ( http://wwwmaster.postgresql.org/download/mirrors-ftp?file=%2Fbinary%2Fv8.2.5%2Fwin32%2Fpostgresql-8.2.5-1.zip )
(same applies here - using this installer will make things alot easier for you)
- SQLite ( http://www.sqlite.org/sqlitedll-3_4_2.zip )
(needs some extra tweaking - but we'll leave that for later)
Step-by-step guide:
- install Visual Studio Professional (obviously not required when allread done)
- install CMake (same applies here)
- extract PvPGN sources from zip/tarball or get them via SVN
- create a folder called "zlib" inside you PvPGN base folder ( i.e. D:/svn/pvpgn/zlib/ )
- extract the following files from zlib123.zip into the "zlib" folder:
zconf.h, zlib.h
- extract the following file from zlib123dll.zip (from with dll32 folder) into the "zlib" folder:
zlibwapi.lib
- install MySQL if you intend to use it as a storage backend
- install PostgreSQL if you intend to use it as a storage backend
- SQLite stub - need some extra tweaking to be explained later (in version 2.0 of this guide)
- create a folder called "build" inside you PvPGN base folder ( i.e. D:/svn/pvpgn/build/ )
- fire up CMake (I'll use the GUI version for this guide - so you should use it, too)
- Where is the source code: D:\svn\pvpgn
- Where to build the binaries: D:\svn\pvpgn\build
- Now press the "Configure" button, select "Visual Studio 2005" as the build environment and wait a few seconds
- all the components should be found without any problems
- now enable optinal components if required ( WITH_MYSQL, WITH_PGSQL, WITH_SQLITE3 ) and "Configure" again
- again all the components should be found without any problems
- Press "OK"
- double-click on D:/svn/pvpgn/build/pvpgn.sln to fire up Visual Studio 2005
- build the "ALL_BUILD" target
- build the "INSTALL" target
- now you should find all the stuff (almost) ready under c:/Program Files/pvpgn/
- extract the following files from zlib123dll.zip (from with dll32 folder) into the "sbin" folder:
zlibwapi.lib
- optionally get the following files from C:\Program Files\MySQL\MySQL Server 5.0\lib\opt\ and copy them into the "sbin" folder
libmysql.dll
- optionally get the following files from C:\Program Files\PostgreSQL\8.2\bin\ and copy them into the "sbin" folder
libpq.dll, libintl-2.dll, libiconv-2.dll, krb5_32.dll, comerr32.dll
- optionally extract the following files from sqlitedll-3_4_2.zip into the "sbin" folder:
sqlite3.dll
- drink a beer and congratulate yourself for what you accomplished today

View file

@ -1,8 +0,0 @@
- README.storage : how to use PvPGN with the various storage drivers (MySQL,
PGSQL, cdb, files etc..)
- INSTALL.unix : how to compile and install on Unix/POSIX operating systems
- FAQ : frequently asked questions
- Compile.Instructions.Win32.Borland.txt : as the filename says
- Compile.Instructions.Win32.VS.Net.txt : same for this one
- PORTS : PvPGN porting status file, check to see if your platform/operating
system is supported

View file

@ -1,64 +0,0 @@
PvPGN Install instructions for the Linux/Unix version
-------------------------------------------------------
1. First get your hands on a PvPGN source tarball or a binary package (RPM/etc).
If you got the source follow instructions bellow, if you got a binary package
jump to step 4. If you get the source you will also need to fetch the support
files package.
2. Unpack the source tarball, change current directory (ex. pvpgn-<version>)
and run configure. You will need to provide configure with your custom options,
ex:
./configure --prefix=<path>
It will configure the source distribution to compile and install in the <path>
location.
./configure --with-mysql
It will configure the source distribution to compile with MySQL support (in
it just tells configure to try to find mysql libs/includes, if it doesnt it
WONT compiled MySQL support; read README.MySQL for more details).
Check using ./configure --help for all available options.
3. Compile and install PvPGN using
*** NOTE ***
you need to use GNU make to compile PvPGN (ie under linux this is
just "make" but under *BSD it is usually named "gmake")
************
$ make
$ make install
WARNING !! make install it will also overwrite the configuration files. Make a
backup of them before doing "make install" (read more about this in the UPDATE
file).
Next thing to do is to unpack the support files package in the "files"
directory of your installed pvpgn (look where pvpgn has installed and search
for a "files" directory, you need to unpack there the support files).
Now you just need to edit the config files and adjust them acording to your
system. Have fun!
4. (only for binary PvPGN distributions)
Depending on the type of package you have obtained (ex RPM, deb, tgz) you will
have to install the package using the right package tool.
Examples:
$ rpm -ivh pvpgn-<ver>.rpm
or
$ installpkg pvpgn-<ver>.tgz
or
$ dpkg -i pvpgn-<ver>.deb
After you install the binary package you will need to adjust PvPGN configuration
files (usually installed in /etc/pvpgn dir). Have fun!

View file

@ -1,16 +0,0 @@
PvPGN porting status file
===========================
Arch. | Operating System | Status | Compilers | Comments
------------------------------------------------------------------
x86 | Linux 2.6.x | OK | g++ >=3.3.x | main dev. platform
x86_64 | Linux 2.6.x | OK | g++ >=3.4.x | sec dev. platform
x86 | WIN32 | OK | mingw | using Dev-C++ IDE
Notes:
- clearly x86 is the most tested version
- the platforms/operating systems not listed have not been tested or they did
not came to our attention however, any POSIX system with a ISO C++98 compiler
should work just fine
- please report to us any platform/OS you use pvpgn on and not listed here

View file

@ -1,17 +0,0 @@
The only graphic formats that Blizzard clients support are: PCX, SMK, and MNG
These are old and therefore uncommon formats that requires specific software to create and modify. PCX allows still images while SMK and MNG formats allow animated images.
The dimensions for ad banners are 468 x 60 pixels
It is not known how to create PCX files that will display properly in PvPGN so your options are down to SMK and MNG however MNG is specific to WarCraft III so SMK is highly recommended.
To begin creating your SMK ad banner, you must download and install the Old Smacker Tools.
Download: http://www.broodwarai.com/downloads/tools/OldSmackerTools.exe
Note: The latest versions of Smacker Tools(now integrated into RAD Video Tools) reportedly only displays for Mac clients. The Old Smacker Tools unfortunately only works on Windows XP
Instructions for converting still images to SMK format.
=========================================================
1. Run smackerw.exe and then click on the "Smack (compress) a graphics file."
2. On the left side, navigate to the folder where your ad banner is stored and select it.
3. Under Options, click on the Palette tab. Check "Total palette colors to use:", set it to 64 and check "Starting palette index to use:", set it to 32. Set "8-bit input palettes" to "Create new."
4. Click on the Frame tab and check "Create ring?"
5. Smack!

32
docs/adbanners.md Normal file
View file

@ -0,0 +1,32 @@
# Ad Banners
---
### Configuration File
The configuration file consists of a single array named ````ads```` which can contain an unlimited number of elements. Each element contains 4 pairs in the following order: ````filename````, ````url````, ````client````, and ````lang````.
- ````filename````: A string containing the filename of the ad banner, should not include a path.
- ````url````: A string containing the URL that users should be directed to when clicking on the ad banner.
- ````client````: A string containing the 4 character client tag that the ad banner should be shown to, a string of "NULL" will cause the ad banner to be shown to any client.
- ````lang````: A string containing a 4 character language code that will be displayed to users who have enabled that particular language, a string of "NULL" will cause the ad banner to be shown to any user.
- Valid ````lang```` tags: ````enUS````, ````deDE````, ````csCZ````, ````esES````, ````frFR````, ````itIT````, ````jaJA````, ````koKR````, ````plPL````, ````ruRU````, ````zhCN````, ````zhTW````, ````NULL````.
### File Formats
| Client | Banner Format |
|------------|---------------|
| StarCraft, Warcraft 2, Diablo | PCX, SMK |
| Diablo 2 | SMK |
| WarCraft 3 | MNG, PNG |
### Banner Dimensions
- The dimensions for ad banners are **468 x 60** pixels
### How To Create SMK Files
1. Download the [Old Smacker Tools](http://files.campaigncreations.org/resources/sc/programs/RADTools.zip)
2. Run *smackerw.exe* and then click on the *Smack (compress) a graphics file.*
3. On the left side, navigate to the folder where your ad banner is stored and select it.
4. Under *Options*, click on the *Palette* tab. Check *Total palette colors to use:*, set it to *64* and check *Starting palette index to use:*, set it to *32*.
5. Set *8-bit input palettes* to *Create new.*
5. Click on the *Frame* tab and check *Create ring?*
6. *Smack!*
### Notes
- It is not known how to create PCX files that will display properly in PvPGN

24
docs/bnmotd.md Normal file
View file

@ -0,0 +1,24 @@
# PvPGN Message Of The Day
---
### Notes
- All lines must begin with **%I**
### Parameters
Parameter | Description
----------- | -------------
%a | Number of registered accounts
%c | Number of existing channels
%g | Number of running games
%G | Number of games with the same clienttag.
%h | Hostname of the server
%H | Contact name (as set in bnetd.conf)
%i | The userid of the user
%l | The username of the user
%N | Name of the game the user has connected with
%m | Check the user's mail
%r | IP address of the user
%s | Servername
%t | The clienttag of the user
%u | Number of users currently logged in
%U | Number of users logged in with the same clienttag
%v | Server version

View file

@ -1,21 +0,0 @@
Here is a short note of how to use and configure the conf/bnmotd.txt
- all lines have to start with %I
- possible parameters that can be used:
-- %a = number of registered accounts on the server
-- %c = number of currently existant channels
-- %g = total number of currently running games
-- %G = games of users with same clienttag.
-- %h = hostname of the server
-- %H = contact name (as set in bnetd.conf)
-- %i = userid of the user
-- %l = username
-- %N = name of the game the user has connected with.
-- %m = check users mail when they login
-- %r = IP of the user
-- %s = the servername
-- %t = clienttag of the user
-- %u = number of users currently logged in
-- %U = users logged in with the same clienttag
-- %v = server version
--

1
docs/compile.g++.md Normal file
View file

@ -0,0 +1 @@
REFER TO http://harpywar.com/?a=articles&b=2&c=1&d=74&lang=en

View file

@ -0,0 +1,53 @@
# A step-by-step guide for building PvPGN using Visual Studio 2015
---
##### Requirements
- [Visual Studio 2015 Community](https://www.visualstudio.com/products/visual-studio-community-vs)
- [CMake](https://cmake.org/download/)
- [zlib](http://zlib.net/)
- [PvPGN](https://github.com/pvpgn/pvpgn-server)
##### Optional
- [MySQL](http://dev.mysql.com/downloads/mysql/)
- [PostgreSQL](http://www.postgresql.org/download/windows/)
- [SQLite](https://sqlite.org/download.html)
---
##### Instructions
- Install *Visual Studio 2015*
- Install *CMake*
- Download zlib
- Download PvPGN source
- Extract PvPGN source to C:\pvpgn\
- Create a folder called *zlib* inside your PvPGN base folder ( i.e. C:\pvpgn\zlib\ )
- Extract the following files from *zlib128-dll.zip\include* into the *zlib* folder:
- zconf.h, zlib.h
- Extract the following files from the *zlib128-dll.zip\lib* into the *zlib* folder:
- zdll.lib
- Install *MySQL* if you intend to use it as a storage backend
- Install *PostgreSQL* if you intend to use it as a storage backend
- Install *SQLite* if you intend to use it as a storage backend
- Create a folder called *build* inside your PvPGN base folder ( i.e. C:\pvpgn\build\ )
- Run *cmake-gui.exe*
- *Where is the source code*: C:\pvpgn
- *Where to build the binaries*: C:\pvpgn\build
- Click the *Configure* button
- Select *Visual Studio 14 2015* as the generator
- Select *Use default native compilers*
- Click the *Finish* button
- Enable optional components if required ( *WITH_MYSQL*, *WITH_PGSQL*, *WITH_SQLITE3*, *WITH_LUA*, *WITH_WIN32_GUI* )
- Click the *Configure* button again
- Click the *Generate* button
- Close *CMake*
- Open *C:\pvpgn\build\pvpgn.sln* with Visual Studio
- Build the *ALL_BUILD* project
- Build the *INSTALL* project
- Open C:\Program Files (x86)\pvpgn
- Extract the following files from *zlib128-dll.zip* into the *pvpgn* folder:
- zlib1.dll
- If required, extract the following files from C:\Program Files\MySQL\MySQL Server 5.6.23\lib\opt\ into the *pvpgn* folder:
- libmysql.dll
- If required, extract the following files from C:\Program Files\PostgreSQL\9.4.1\bin\ into the "pvpgn" folder:
- libpq.dll, libintl-2.dll, libiconv-2.dll, krb5_32.dll, comerr32.dll
- If required, extract the following files from sqlite-dll-win32-x86-3080803.zip into the "pvpgn" folder:
- sqlite3.dll

18
docs/ports.md Normal file
View file

@ -0,0 +1,18 @@
# PvPGN Porting Status
Arch | Operating System | Status | Compiler | CMake
----- | ------------------------- | --------- | ----------------------------------- | ---------
x86_64 | Arch Linux 2015.09.29 | OK | G++ 5.2.0 | 3.3.2
x86_64 | Arch Linux 2015.09.29 | OK | Clang 3.7.0 | 3.3.2
x86_64 | Arch Linux 2015.09.29 | NO | MinGW 5.2.0 | 3.3.2
x86_64 | Ubuntu Server 15.04 | OK | G++ 5.1.1 | 3.3.2
x86_64 | Ubuntu Server 15.04 | OK | G++ 5.1.0 | 3.4.0-rc1
x86_64 | Ubuntu Server 14.04 | OK | G++ 5.1.0 | 3.4.0-rc1
x86_64 | CentOS 7.3.1611 | OK | G++ 5.3.1 | 3.6.1
x86_64 | Fedora 25 | OK | G++ 6.2.1 | 3.6.2
x86_64 | Windows 10.0.10240 | OK | VC++ 14 | 3.3.1
x86_64 | Windows 10.0.10240 | OK | Clang r249555 | 3.3.1
x86_64 | OS X 10.11.6 | OK | Apple LLVM 7.3.0 (clang-703.0.31) | 3.6.1
# Notes
- Any POSIX/WIN32 OS with a C++11 compliant compiler should work
- The minimum required compiler version for G++ and Visual Studio is hardcoded

12
docs/readme.md Normal file
View file

@ -0,0 +1,12 @@
# Index
---
File | Description
--------------- | -------------
adbanners.md | Instructions on creating SMK ad banners for PvPGN
bnmotd.md | Documentation of parameters for bnmotd.txt
compile.g++.md | Instructions for compiling with G++
compile.visualstudio2015.md | Instructions for compiling with Visual Studio 2015
fdwatch.txt | Documentation of the fdwatch API
ports.md | Documentation on tested operating systems, compilers, and tools for compiling PvPGN
readme.md | This file
storage.txt | Documentation of PvPGN's storage systems

16
docs/versioncheck.md Normal file
View file

@ -0,0 +1,16 @@
# VersionCheck
### Configuration File
The configuration file is in standard JSON format and consists of arrays for each Battle.net game client whose names are a four-letter string.
Within the game client arrays are arrays for platform whose names are also a four-letter string (i.e. `IX86`, `PMAC`, `XMAC`).
Within the platform arrays are arrays for the game client's version ID, traditionally known as a "version byte". The version ID is traditionally written in hex format, as indicated with a preceding "0x" or "0X", but can also be in decimal format. The version ID array consists of two pairs, `checkRevisionFile` and `equation`, and an array, `entries`.
The `entries` array consists of five pairs: `title`, `version`, `hash`, `fileMetadata`, `versionTag`.
- `title`: This is to assist the reader of the configuration file, it does not affect the entry in any way.
- `version`: The version number returned by CheckRevision which is obtained from the [VERSIONINFO](https://msdn.microsoft.com/en-us/library/aa381058) resource of the game file. See sample implementation: https://github.com/pvpgn/CheckRevision
- `hash`: The hash returned by CheckRevision which uses up to three files from the game to produce the hash. See sample implementation: https://github.com/pvpgn/CheckRevision
- `fileMetadata`: The string returned by CheckRevision which consists of the game's filename, last modified date, last modified time, and filesize, all separated by one space (e.g. `war3.exe 08/16/09 19:21:59 471040`). See sample implementation: https://github.com/pvpgn/CheckRevision
- Note: This pair is currently unused by PvPGN, but may be used in the future.
- `versionTag`: An arbitrary string that must be unique from all other version tags. It is traditionally in the form of the four-letter game string, followed by an underscore and the version (e.g. `WAR3_1282` is used for WarCraft 3: Reign of Chaos 1.28.2).

View file

@ -17,9 +17,21 @@ file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/var/status")
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/var/ DESTINATION ${LOCALSTATEDIR})
install(FILES ad000001.mng ad000001.smk ad000002.mng ad000003.mng
ad000004.mng ad000075.mng newbie.save
bnserver.ini bnserver-D2DV.ini bnserver-D2XP.ini bnserver-WAR3.ini
ver-ix86-1.mpq IX86ver1.mpq PMACver1.mpq XMACver1.mpq IX86ExtraWork.mpq
icons.bni icons-WAR3.bni
DESTINATION ${LOCALSTATEDIR}/files)
install(FILES ad000001.png
ad000001.smk
ad000002.mng
ad000002.smk
bnserver.ini
bnserver-D2DV.ini
bnserver-D2XP.ini
bnserver-WAR3.ini
icons.bni
icons_STAR.bni
icons-WAR3.bni
IX86ExtraWork.mpq
IX86ver1.mpq
newbie.save
PMACver1.mpq
ver-IX86-1.mpq
XMACver1.mpq
DESTINATION ${LOCALSTATEDIR}/files)

Binary file not shown.

BIN
files/ad000001.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Binary file not shown.

BIN
files/ad000002.smk Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
files/icons_STAR.bni Normal file

Binary file not shown.

BIN
files/ver-IX86-1.mpq Normal file

Binary file not shown.

Binary file not shown.

20
lib/fmt/CMakeLists.txt Normal file
View file

@ -0,0 +1,20 @@
set(FMT_SOURCES ${FMT_SOURCES}
${CMAKE_CURRENT_SOURCE_DIR}/core.h
${CMAKE_CURRENT_SOURCE_DIR}/format.cc
${CMAKE_CURRENT_SOURCE_DIR}/format.h
${CMAKE_CURRENT_SOURCE_DIR}/format-inl.h
${CMAKE_CURRENT_SOURCE_DIR}/ostream.h
${CMAKE_CURRENT_SOURCE_DIR}/posix.cc
${CMAKE_CURRENT_SOURCE_DIR}/posix.h
${CMAKE_CURRENT_SOURCE_DIR}/printf.h
${CMAKE_CURRENT_SOURCE_DIR}/ranges.h
${CMAKE_CURRENT_SOURCE_DIR}/time.h
)
add_library(fmt ${FMT_SOURCES})
target_include_directories(fmt
PUBLIC
$<INSTALL_INTERFACE:lib>
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/lib>
)

1331
lib/fmt/core.h Normal file

File diff suppressed because it is too large Load diff

564
lib/fmt/format-inl.h Normal file
View file

@ -0,0 +1,564 @@
// Formatting library for C++
//
// Copyright (c) 2012 - 2016, Victor Zverovich
// All rights reserved.
//
// For the license information refer to format.h.
#ifndef FMT_FORMAT_INL_H_
#define FMT_FORMAT_INL_H_
#include "format.h"
#include <string.h>
#include <cctype>
#include <cerrno>
#include <climits>
#include <cmath>
#include <cstdarg>
#include <cstddef> // for std::ptrdiff_t
#include <locale>
#if defined(_WIN32) && defined(__MINGW32__)
# include <cstring>
#endif
#if FMT_USE_WINDOWS_H
# if !defined(FMT_HEADER_ONLY) && !defined(WIN32_LEAN_AND_MEAN)
# define WIN32_LEAN_AND_MEAN
# endif
# if defined(NOMINMAX) || defined(FMT_WIN_MINMAX)
# include <windows.h>
# else
# define NOMINMAX
# include <windows.h>
# undef NOMINMAX
# endif
#endif
#if FMT_EXCEPTIONS
# define FMT_TRY try
# define FMT_CATCH(x) catch (x)
#else
# define FMT_TRY if (true)
# define FMT_CATCH(x) if (false)
#endif
#ifdef _MSC_VER
# pragma warning(push)
# pragma warning(disable: 4127) // conditional expression is constant
# pragma warning(disable: 4702) // unreachable code
// Disable deprecation warning for strerror. The latter is not called but
// MSVC fails to detect it.
# pragma warning(disable: 4996)
#endif
// Dummy implementations of strerror_r and strerror_s called if corresponding
// system functions are not available.
inline fmt::internal::null<> strerror_r(int, char *, ...) {
return fmt::internal::null<>();
}
inline fmt::internal::null<> strerror_s(char *, std::size_t, ...) {
return fmt::internal::null<>();
}
FMT_BEGIN_NAMESPACE
namespace {
#ifndef _MSC_VER
# define FMT_SNPRINTF snprintf
#else // _MSC_VER
inline int fmt_snprintf(char *buffer, size_t size, const char *format, ...) {
va_list args;
va_start(args, format);
int result = vsnprintf_s(buffer, size, _TRUNCATE, format, args);
va_end(args);
return result;
}
# define FMT_SNPRINTF fmt_snprintf
#endif // _MSC_VER
#if defined(_WIN32) && defined(__MINGW32__) && !defined(__NO_ISOCEXT)
# define FMT_SWPRINTF snwprintf
#else
# define FMT_SWPRINTF swprintf
#endif // defined(_WIN32) && defined(__MINGW32__) && !defined(__NO_ISOCEXT)
typedef void (*FormatFunc)(internal::buffer &, int, string_view);
// Portable thread-safe version of strerror.
// Sets buffer to point to a string describing the error code.
// This can be either a pointer to a string stored in buffer,
// or a pointer to some static immutable string.
// Returns one of the following values:
// 0 - success
// ERANGE - buffer is not large enough to store the error message
// other - failure
// Buffer should be at least of size 1.
int safe_strerror(
int error_code, char *&buffer, std::size_t buffer_size) FMT_NOEXCEPT {
FMT_ASSERT(buffer != FMT_NULL && buffer_size != 0, "invalid buffer");
class dispatcher {
private:
int error_code_;
char *&buffer_;
std::size_t buffer_size_;
// A noop assignment operator to avoid bogus warnings.
void operator=(const dispatcher &) {}
// Handle the result of XSI-compliant version of strerror_r.
int handle(int result) {
// glibc versions before 2.13 return result in errno.
return result == -1 ? errno : result;
}
// Handle the result of GNU-specific version of strerror_r.
int handle(char *message) {
// If the buffer is full then the message is probably truncated.
if (message == buffer_ && strlen(buffer_) == buffer_size_ - 1)
return ERANGE;
buffer_ = message;
return 0;
}
// Handle the case when strerror_r is not available.
int handle(internal::null<>) {
return fallback(strerror_s(buffer_, buffer_size_, error_code_));
}
// Fallback to strerror_s when strerror_r is not available.
int fallback(int result) {
// If the buffer is full then the message is probably truncated.
return result == 0 && strlen(buffer_) == buffer_size_ - 1 ?
ERANGE : result;
}
// Fallback to strerror if strerror_r and strerror_s are not available.
int fallback(internal::null<>) {
errno = 0;
buffer_ = strerror(error_code_);
return errno;
}
public:
dispatcher(int err_code, char *&buf, std::size_t buf_size)
: error_code_(err_code), buffer_(buf), buffer_size_(buf_size) {}
int run() {
return handle(strerror_r(error_code_, buffer_, buffer_size_));
}
};
return dispatcher(error_code, buffer, buffer_size).run();
}
void format_error_code(internal::buffer &out, int error_code,
string_view message) FMT_NOEXCEPT {
// Report error code making sure that the output fits into
// inline_buffer_size to avoid dynamic memory allocation and potential
// bad_alloc.
out.resize(0);
static const char SEP[] = ": ";
static const char ERROR_STR[] = "error ";
// Subtract 2 to account for terminating null characters in SEP and ERROR_STR.
std::size_t error_code_size = sizeof(SEP) + sizeof(ERROR_STR) - 2;
typedef internal::int_traits<int>::main_type main_type;
main_type abs_value = static_cast<main_type>(error_code);
if (internal::is_negative(error_code)) {
abs_value = 0 - abs_value;
++error_code_size;
}
error_code_size += internal::count_digits(abs_value);
writer w(out);
if (message.size() <= inline_buffer_size - error_code_size) {
w.write(message);
w.write(SEP);
}
w.write(ERROR_STR);
w.write(error_code);
assert(out.size() <= inline_buffer_size);
}
void report_error(FormatFunc func, int error_code,
string_view message) FMT_NOEXCEPT {
memory_buffer full_message;
func(full_message, error_code, message);
// Use Writer::data instead of Writer::c_str to avoid potential memory
// allocation.
std::fwrite(full_message.data(), full_message.size(), 1, stderr);
std::fputc('\n', stderr);
}
} // namespace
class locale {
private:
std::locale locale_;
public:
explicit locale(std::locale loc = std::locale()) : locale_(loc) {}
std::locale get() { return locale_; }
};
template <typename Char>
FMT_FUNC Char internal::thousands_sep(locale_provider *lp) {
std::locale loc = lp ? lp->locale().get() : std::locale();
return std::use_facet<std::numpunct<Char>>(loc).thousands_sep();
}
FMT_FUNC void system_error::init(
int err_code, string_view format_str, format_args args) {
error_code_ = err_code;
memory_buffer buffer;
format_system_error(buffer, err_code, vformat(format_str, args));
std::runtime_error &base = *this;
base = std::runtime_error(to_string(buffer));
}
namespace internal {
template <typename T>
int char_traits<char>::format_float(
char *buffer, std::size_t size, const char *format, int precision, T value) {
return precision < 0 ?
FMT_SNPRINTF(buffer, size, format, value) :
FMT_SNPRINTF(buffer, size, format, precision, value);
}
template <typename T>
int char_traits<wchar_t>::format_float(
wchar_t *buffer, std::size_t size, const wchar_t *format, int precision,
T value) {
return precision < 0 ?
FMT_SWPRINTF(buffer, size, format, value) :
FMT_SWPRINTF(buffer, size, format, precision, value);
}
template <typename T>
const char basic_data<T>::DIGITS[] =
"0001020304050607080910111213141516171819"
"2021222324252627282930313233343536373839"
"4041424344454647484950515253545556575859"
"6061626364656667686970717273747576777879"
"8081828384858687888990919293949596979899";
#define FMT_POWERS_OF_10(factor) \
factor * 10, \
factor * 100, \
factor * 1000, \
factor * 10000, \
factor * 100000, \
factor * 1000000, \
factor * 10000000, \
factor * 100000000, \
factor * 1000000000
template <typename T>
const uint32_t basic_data<T>::POWERS_OF_10_32[] = {
0, FMT_POWERS_OF_10(1)
};
template <typename T>
const uint64_t basic_data<T>::POWERS_OF_10_64[] = {
0,
FMT_POWERS_OF_10(1),
FMT_POWERS_OF_10(1000000000ull),
10000000000000000000ull
};
// Normalized 64-bit significands of pow(10, k), for k = -348, -340, ..., 340.
// These are generated by support/compute-powers.py.
template <typename T>
const uint64_t basic_data<T>::POW10_SIGNIFICANDS[] = {
0xfa8fd5a0081c0288, 0xbaaee17fa23ebf76, 0x8b16fb203055ac76, 0xcf42894a5dce35ea,
0x9a6bb0aa55653b2d, 0xe61acf033d1a45df, 0xab70fe17c79ac6ca, 0xff77b1fcbebcdc4f,
0xbe5691ef416bd60c, 0x8dd01fad907ffc3c, 0xd3515c2831559a83, 0x9d71ac8fada6c9b5,
0xea9c227723ee8bcb, 0xaecc49914078536d, 0x823c12795db6ce57, 0xc21094364dfb5637,
0x9096ea6f3848984f, 0xd77485cb25823ac7, 0xa086cfcd97bf97f4, 0xef340a98172aace5,
0xb23867fb2a35b28e, 0x84c8d4dfd2c63f3b, 0xc5dd44271ad3cdba, 0x936b9fcebb25c996,
0xdbac6c247d62a584, 0xa3ab66580d5fdaf6, 0xf3e2f893dec3f126, 0xb5b5ada8aaff80b8,
0x87625f056c7c4a8b, 0xc9bcff6034c13053, 0x964e858c91ba2655, 0xdff9772470297ebd,
0xa6dfbd9fb8e5b88f, 0xf8a95fcf88747d94, 0xb94470938fa89bcf, 0x8a08f0f8bf0f156b,
0xcdb02555653131b6, 0x993fe2c6d07b7fac, 0xe45c10c42a2b3b06, 0xaa242499697392d3,
0xfd87b5f28300ca0e, 0xbce5086492111aeb, 0x8cbccc096f5088cc, 0xd1b71758e219652c,
0x9c40000000000000, 0xe8d4a51000000000, 0xad78ebc5ac620000, 0x813f3978f8940984,
0xc097ce7bc90715b3, 0x8f7e32ce7bea5c70, 0xd5d238a4abe98068, 0x9f4f2726179a2245,
0xed63a231d4c4fb27, 0xb0de65388cc8ada8, 0x83c7088e1aab65db, 0xc45d1df942711d9a,
0x924d692ca61be758, 0xda01ee641a708dea, 0xa26da3999aef774a, 0xf209787bb47d6b85,
0xb454e4a179dd1877, 0x865b86925b9bc5c2, 0xc83553c5c8965d3d, 0x952ab45cfa97a0b3,
0xde469fbd99a05fe3, 0xa59bc234db398c25, 0xf6c69a72a3989f5c, 0xb7dcbf5354e9bece,
0x88fcf317f22241e2, 0xcc20ce9bd35c78a5, 0x98165af37b2153df, 0xe2a0b5dc971f303a,
0xa8d9d1535ce3b396, 0xfb9b7cd9a4a7443c, 0xbb764c4ca7a44410, 0x8bab8eefb6409c1a,
0xd01fef10a657842c, 0x9b10a4e5e9913129, 0xe7109bfba19c0c9d, 0xac2820d9623bf429,
0x80444b5e7aa7cf85, 0xbf21e44003acdd2d, 0x8e679c2f5e44ff8f, 0xd433179d9c8cb841,
0x9e19db92b4e31ba9, 0xeb96bf6ebadf77d9, 0xaf87023b9bf0ee6b
};
// Binary exponents of pow(10, k), for k = -348, -340, ..., 340, corresponding
// to significands above.
template <typename T>
const int16_t basic_data<T>::POW10_EXPONENTS[] = {
-1220, -1193, -1166, -1140, -1113, -1087, -1060, -1034, -1007, -980, -954,
-927, -901, -874, -847, -821, -794, -768, -741, -715, -688, -661,
-635, -608, -582, -555, -529, -502, -475, -449, -422, -396, -369,
-343, -316, -289, -263, -236, -210, -183, -157, -130, -103, -77,
-50, -24, 3, 30, 56, 83, 109, 136, 162, 189, 216,
242, 269, 295, 322, 348, 375, 402, 428, 455, 481, 508,
534, 561, 588, 614, 641, 667, 694, 720, 747, 774, 800,
827, 853, 880, 907, 933, 960, 986, 1013, 1039, 1066
};
template <typename T> const char basic_data<T>::RESET_COLOR[] = "\x1b[0m";
template <typename T> const wchar_t basic_data<T>::WRESET_COLOR[] = L"\x1b[0m";
FMT_FUNC fp operator*(fp x, fp y) {
// Multiply 32-bit parts of significands.
uint64_t mask = (1ULL << 32) - 1;
uint64_t a = x.f >> 32, b = x.f & mask;
uint64_t c = y.f >> 32, d = y.f & mask;
uint64_t ac = a * c, bc = b * c, ad = a * d, bd = b * d;
// Compute mid 64-bit of result and round.
uint64_t mid = (bd >> 32) + (ad & mask) + (bc & mask) + (1U << 31);
return fp(ac + (ad >> 32) + (bc >> 32) + (mid >> 32), x.e + y.e + 64);
}
FMT_FUNC fp get_cached_power(int min_exponent, int &pow10_exponent) {
const double one_over_log2_10 = 0.30102999566398114; // 1 / log2(10)
int index = static_cast<int>(std::ceil(
(min_exponent + fp::significand_size - 1) * one_over_log2_10));
// Decimal exponent of the first (smallest) cached power of 10.
const int first_dec_exp = -348;
// Difference between two consecutive decimal exponents in cached powers of 10.
const int dec_exp_step = 8;
index = (index - first_dec_exp - 1) / dec_exp_step + 1;
pow10_exponent = first_dec_exp + index * dec_exp_step;
return fp(data::POW10_SIGNIFICANDS[index], data::POW10_EXPONENTS[index]);
}
} // namespace internal
#if FMT_USE_WINDOWS_H
FMT_FUNC internal::utf8_to_utf16::utf8_to_utf16(string_view s) {
static const char ERROR_MSG[] = "cannot convert string from UTF-8 to UTF-16";
if (s.size() > INT_MAX)
FMT_THROW(windows_error(ERROR_INVALID_PARAMETER, ERROR_MSG));
int s_size = static_cast<int>(s.size());
if (s_size == 0) {
// MultiByteToWideChar does not support zero length, handle separately.
buffer_.resize(1);
buffer_[0] = 0;
return;
}
int length = MultiByteToWideChar(
CP_UTF8, MB_ERR_INVALID_CHARS, s.data(), s_size, FMT_NULL, 0);
if (length == 0)
FMT_THROW(windows_error(GetLastError(), ERROR_MSG));
buffer_.resize(length + 1);
length = MultiByteToWideChar(
CP_UTF8, MB_ERR_INVALID_CHARS, s.data(), s_size, &buffer_[0], length);
if (length == 0)
FMT_THROW(windows_error(GetLastError(), ERROR_MSG));
buffer_[length] = 0;
}
FMT_FUNC internal::utf16_to_utf8::utf16_to_utf8(wstring_view s) {
if (int error_code = convert(s)) {
FMT_THROW(windows_error(error_code,
"cannot convert string from UTF-16 to UTF-8"));
}
}
FMT_FUNC int internal::utf16_to_utf8::convert(wstring_view s) {
if (s.size() > INT_MAX)
return ERROR_INVALID_PARAMETER;
int s_size = static_cast<int>(s.size());
if (s_size == 0) {
// WideCharToMultiByte does not support zero length, handle separately.
buffer_.resize(1);
buffer_[0] = 0;
return 0;
}
int length = WideCharToMultiByte(
CP_UTF8, 0, s.data(), s_size, FMT_NULL, 0, FMT_NULL, FMT_NULL);
if (length == 0)
return GetLastError();
buffer_.resize(length + 1);
length = WideCharToMultiByte(
CP_UTF8, 0, s.data(), s_size, &buffer_[0], length, FMT_NULL, FMT_NULL);
if (length == 0)
return GetLastError();
buffer_[length] = 0;
return 0;
}
FMT_FUNC void windows_error::init(
int err_code, string_view format_str, format_args args) {
error_code_ = err_code;
memory_buffer buffer;
internal::format_windows_error(buffer, err_code, vformat(format_str, args));
std::runtime_error &base = *this;
base = std::runtime_error(to_string(buffer));
}
FMT_FUNC void internal::format_windows_error(
internal::buffer &out, int error_code, string_view message) FMT_NOEXCEPT {
FMT_TRY {
wmemory_buffer buf;
buf.resize(inline_buffer_size);
for (;;) {
wchar_t *system_message = &buf[0];
int result = FormatMessageW(
FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
FMT_NULL, error_code, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
system_message, static_cast<uint32_t>(buf.size()), FMT_NULL);
if (result != 0) {
utf16_to_utf8 utf8_message;
if (utf8_message.convert(system_message) == ERROR_SUCCESS) {
writer w(out);
w.write(message);
w.write(": ");
w.write(utf8_message);
return;
}
break;
}
if (GetLastError() != ERROR_INSUFFICIENT_BUFFER)
break; // Can't get error message, report error code instead.
buf.resize(buf.size() * 2);
}
} FMT_CATCH(...) {}
format_error_code(out, error_code, message);
}
#endif // FMT_USE_WINDOWS_H
FMT_FUNC void format_system_error(
internal::buffer &out, int error_code, string_view message) FMT_NOEXCEPT {
FMT_TRY {
memory_buffer buf;
buf.resize(inline_buffer_size);
for (;;) {
char *system_message = &buf[0];
int result = safe_strerror(error_code, system_message, buf.size());
if (result == 0) {
writer w(out);
w.write(message);
w.write(": ");
w.write(system_message);
return;
}
if (result != ERANGE)
break; // Can't get error message, report error code instead.
buf.resize(buf.size() * 2);
}
} FMT_CATCH(...) {}
format_error_code(out, error_code, message);
}
template <typename Char>
void basic_fixed_buffer<Char>::grow(std::size_t) {
FMT_THROW(std::runtime_error("buffer overflow"));
}
FMT_FUNC void internal::error_handler::on_error(const char *message) {
FMT_THROW(format_error(message));
}
FMT_FUNC void report_system_error(
int error_code, fmt::string_view message) FMT_NOEXCEPT {
report_error(format_system_error, error_code, message);
}
#if FMT_USE_WINDOWS_H
FMT_FUNC void report_windows_error(
int error_code, fmt::string_view message) FMT_NOEXCEPT {
report_error(internal::format_windows_error, error_code, message);
}
#endif
FMT_FUNC void vprint(std::FILE *f, string_view format_str, format_args args) {
memory_buffer buffer;
vformat_to(buffer, format_str, args);
std::fwrite(buffer.data(), 1, buffer.size(), f);
}
FMT_FUNC void vprint(std::FILE *f, wstring_view format_str, wformat_args args) {
wmemory_buffer buffer;
vformat_to(buffer, format_str, args);
std::fwrite(buffer.data(), sizeof(wchar_t), buffer.size(), f);
}
FMT_FUNC void vprint(string_view format_str, format_args args) {
vprint(stdout, format_str, args);
}
FMT_FUNC void vprint(wstring_view format_str, wformat_args args) {
vprint(stdout, format_str, args);
}
#ifndef FMT_EXTENDED_COLORS
FMT_FUNC void vprint_colored(color c, string_view format, format_args args) {
char escape[] = "\x1b[30m";
escape[3] = static_cast<char>('0' + c);
std::fputs(escape, stdout);
vprint(format, args);
std::fputs(internal::data::RESET_COLOR, stdout);
}
FMT_FUNC void vprint_colored(color c, wstring_view format, wformat_args args) {
wchar_t escape[] = L"\x1b[30m";
escape[3] = static_cast<wchar_t>('0' + c);
std::fputws(escape, stdout);
vprint(format, args);
std::fputws(internal::data::WRESET_COLOR, stdout);
}
#else
namespace internal {
FMT_CONSTEXPR void to_esc(uint8_t c, char out[], int offset) {
out[offset + 0] = static_cast<char>('0' + c / 100);
out[offset + 1] = static_cast<char>('0' + c / 10 % 10);
out[offset + 2] = static_cast<char>('0' + c % 10);
}
} // namespace internal
FMT_FUNC void vprint_rgb(rgb fd, string_view format, format_args args) {
char escape_fd[] = "\x1b[38;2;000;000;000m";
internal::to_esc(fd.r, escape_fd, 7);
internal::to_esc(fd.g, escape_fd, 11);
internal::to_esc(fd.b, escape_fd, 15);
std::fputs(escape_fd, stdout);
vprint(format, args);
std::fputs(internal::data::RESET_COLOR, stdout);
}
FMT_FUNC void vprint_rgb(rgb fd, rgb bg, string_view format, format_args args) {
char escape_fd[] = "\x1b[38;2;000;000;000m"; // foreground color
char escape_bg[] = "\x1b[48;2;000;000;000m"; // background color
internal::to_esc(fd.r, escape_fd, 7);
internal::to_esc(fd.g, escape_fd, 11);
internal::to_esc(fd.b, escape_fd, 15);
internal::to_esc(bg.r, escape_bg, 7);
internal::to_esc(bg.g, escape_bg, 11);
internal::to_esc(bg.b, escape_bg, 15);
std::fputs(escape_fd, stdout);
std::fputs(escape_bg, stdout);
vprint(format, args);
std::fputs(internal::data::RESET_COLOR, stdout);
}
#endif
FMT_FUNC locale locale_provider::locale() { return fmt::locale(); }
FMT_END_NAMESPACE
#ifdef _MSC_VER
# pragma warning(pop)
#endif
#endif // FMT_FORMAT_INL_H_

52
lib/fmt/format.cc Normal file
View file

@ -0,0 +1,52 @@
// Formatting library for C++
//
// Copyright (c) 2012 - 2016, Victor Zverovich
// All rights reserved.
//
// For the license information refer to format.h.
#include "fmt/format-inl.h"
FMT_BEGIN_NAMESPACE
namespace internal {
// Force linking of inline functions into the library.
std::string (*vformat_ref)(string_view, format_args) = vformat;
std::wstring (*vformat_wref)(wstring_view, wformat_args) = vformat;
}
template struct internal::basic_data<void>;
// Explicit instantiations for char.
template FMT_API char internal::thousands_sep(locale_provider *lp);
template void basic_fixed_buffer<char>::grow(std::size_t);
template void internal::arg_map<format_context>::init(
const basic_format_args<format_context> &args);
template FMT_API int internal::char_traits<char>::format_float(
char *buffer, std::size_t size, const char *format, int precision,
double value);
template FMT_API int internal::char_traits<char>::format_float(
char *buffer, std::size_t size, const char *format, int precision,
long double value);
// Explicit instantiations for wchar_t.
template FMT_API wchar_t internal::thousands_sep(locale_provider *lp);
template void basic_fixed_buffer<wchar_t>::grow(std::size_t);
template void internal::arg_map<wformat_context>::init(
const basic_format_args<wformat_context> &args);
template FMT_API int internal::char_traits<wchar_t>::format_float(
wchar_t *buffer, std::size_t size, const wchar_t *format,
int precision, double value);
template FMT_API int internal::char_traits<wchar_t>::format_float(
wchar_t *buffer, std::size_t size, const wchar_t *format,
int precision, long double value);
FMT_END_NAMESPACE

3937
lib/fmt/format.h Normal file

File diff suppressed because it is too large Load diff

162
lib/fmt/ostream.h Normal file
View file

@ -0,0 +1,162 @@
// Formatting library for C++ - std::ostream support
//
// Copyright (c) 2012 - 2016, Victor Zverovich
// All rights reserved.
//
// For the license information refer to format.h.
#ifndef FMT_OSTREAM_H_
#define FMT_OSTREAM_H_
#include "format.h"
#include <ostream>
FMT_BEGIN_NAMESPACE
namespace internal {
template <class Char>
class formatbuf : public std::basic_streambuf<Char> {
private:
typedef typename std::basic_streambuf<Char>::int_type int_type;
typedef typename std::basic_streambuf<Char>::traits_type traits_type;
basic_buffer<Char> &buffer_;
public:
formatbuf(basic_buffer<Char> &buffer) : buffer_(buffer) {}
protected:
// The put-area is actually always empty. This makes the implementation
// simpler and has the advantage that the streambuf and the buffer are always
// in sync and sputc never writes into uninitialized memory. The obvious
// disadvantage is that each call to sputc always results in a (virtual) call
// to overflow. There is no disadvantage here for sputn since this always
// results in a call to xsputn.
int_type overflow(int_type ch = traits_type::eof()) FMT_OVERRIDE {
if (!traits_type::eq_int_type(ch, traits_type::eof()))
buffer_.push_back(static_cast<Char>(ch));
return ch;
}
std::streamsize xsputn(const Char *s, std::streamsize count) FMT_OVERRIDE {
buffer_.append(s, s + count);
return count;
}
};
template <typename Char>
struct test_stream : std::basic_ostream<Char> {
private:
struct null;
// Hide all operator<< from std::basic_ostream<Char>.
void operator<<(null);
};
// Checks if T has a user-defined operator<< (e.g. not a member of std::ostream).
template <typename T, typename Char>
class is_streamable {
private:
template <typename U>
static decltype(
internal::declval<test_stream<Char>&>()
<< internal::declval<U>(), std::true_type()) test(int);
template <typename>
static std::false_type test(...);
typedef decltype(test<T>(0)) result;
public:
// std::string operator<< is not considered user-defined because we handle strings
// specially.
static const bool value = result::value && !std::is_same<T, std::string>::value;
};
// Disable conversion to int if T has an overloaded operator<< which is a free
// function (not a member of std::ostream).
template <typename T, typename Char>
class convert_to_int<T, Char, true> {
public:
static const bool value =
convert_to_int<T, Char, false>::value && !is_streamable<T, Char>::value;
};
// Write the content of buf to os.
template <typename Char>
void write(std::basic_ostream<Char> &os, basic_buffer<Char> &buf) {
const Char *data = buf.data();
typedef std::make_unsigned<std::streamsize>::type UnsignedStreamSize;
UnsignedStreamSize size = buf.size();
UnsignedStreamSize max_size =
internal::to_unsigned((std::numeric_limits<std::streamsize>::max)());
do {
UnsignedStreamSize n = size <= max_size ? size : max_size;
os.write(data, static_cast<std::streamsize>(n));
data += n;
size -= n;
} while (size != 0);
}
template <typename Char, typename T>
void format_value(basic_buffer<Char> &buffer, const T &value) {
internal::formatbuf<Char> format_buf(buffer);
std::basic_ostream<Char> output(&format_buf);
output.exceptions(std::ios_base::failbit | std::ios_base::badbit);
output << value;
buffer.resize(buffer.size());
}
// Disable builtin formatting of enums and use operator<< instead.
template <typename T>
struct format_enum<T,
typename std::enable_if<std::is_enum<T>::value>::type> : std::false_type {};
} // namespace internal
// Formats an object of type T that has an overloaded ostream operator<<.
template <typename T, typename Char>
struct formatter<T, Char,
typename std::enable_if<internal::is_streamable<T, Char>::value>::type>
: formatter<basic_string_view<Char>, Char> {
template <typename Context>
auto format(const T &value, Context &ctx) -> decltype(ctx.out()) {
basic_memory_buffer<Char> buffer;
internal::format_value(buffer, value);
basic_string_view<Char> str(buffer.data(), buffer.size());
formatter<basic_string_view<Char>, Char>::format(str, ctx);
return ctx.out();
}
};
template <typename Char>
inline void vprint(std::basic_ostream<Char> &os,
basic_string_view<Char> format_str,
basic_format_args<typename buffer_context<Char>::type> args) {
basic_memory_buffer<Char> buffer;
vformat_to(buffer, format_str, args);
internal::write(os, buffer);
}
/**
\rst
Prints formatted data to the stream *os*.
**Example**::
fmt::print(cerr, "Don't {}!", "panic");
\endrst
*/
template <typename... Args>
inline void print(std::ostream &os, string_view format_str,
const Args & ... args) {
vprint<char>(os, format_str, make_format_args<format_context>(args...));
}
template <typename... Args>
inline void print(std::wostream &os, wstring_view format_str,
const Args & ... args) {
vprint<wchar_t>(os, format_str, make_format_args<wformat_context>(args...));
}
FMT_END_NAMESPACE
#endif // FMT_OSTREAM_H_

244
lib/fmt/posix.cc Normal file
View file

@ -0,0 +1,244 @@
// A C++ interface to POSIX functions.
//
// Copyright (c) 2012 - 2016, Victor Zverovich
// All rights reserved.
//
// For the license information refer to format.h.
// Disable bogus MSVC warnings.
#if !defined(_CRT_SECURE_NO_WARNINGS) && defined(_MSC_VER)
# define _CRT_SECURE_NO_WARNINGS
#endif
#include "fmt/posix.h"
#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#ifndef _WIN32
# include <unistd.h>
#else
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# include <windows.h>
# include <io.h>
# define O_CREAT _O_CREAT
# define O_TRUNC _O_TRUNC
# ifndef S_IRUSR
# define S_IRUSR _S_IREAD
# endif
# ifndef S_IWUSR
# define S_IWUSR _S_IWRITE
# endif
# ifdef __MINGW32__
# define _SH_DENYNO 0x40
# endif
#endif // _WIN32
#ifdef fileno
# undef fileno
#endif
namespace {
#ifdef _WIN32
// Return type of read and write functions.
typedef int RWResult;
// On Windows the count argument to read and write is unsigned, so convert
// it from size_t preventing integer overflow.
inline unsigned convert_rwcount(std::size_t count) {
return count <= UINT_MAX ? static_cast<unsigned>(count) : UINT_MAX;
}
#else
// Return type of read and write functions.
typedef ssize_t RWResult;
inline std::size_t convert_rwcount(std::size_t count) { return count; }
#endif
}
FMT_BEGIN_NAMESPACE
buffered_file::~buffered_file() FMT_NOEXCEPT {
if (file_ && FMT_SYSTEM(fclose(file_)) != 0)
report_system_error(errno, "cannot close file");
}
buffered_file::buffered_file(cstring_view filename, cstring_view mode) {
FMT_RETRY_VAL(file_,
FMT_SYSTEM(fopen(filename.c_str(), mode.c_str())), FMT_NULL);
if (!file_)
FMT_THROW(system_error(errno, "cannot open file {}", filename.c_str()));
}
void buffered_file::close() {
if (!file_)
return;
int result = FMT_SYSTEM(fclose(file_));
file_ = FMT_NULL;
if (result != 0)
FMT_THROW(system_error(errno, "cannot close file"));
}
// A macro used to prevent expansion of fileno on broken versions of MinGW.
#define FMT_ARGS
int buffered_file::fileno() const {
int fd = FMT_POSIX_CALL(fileno FMT_ARGS(file_));
if (fd == -1)
FMT_THROW(system_error(errno, "cannot get file descriptor"));
return fd;
}
file::file(cstring_view path, int oflag) {
int mode = S_IRUSR | S_IWUSR;
#if defined(_WIN32) && !defined(__MINGW32__)
fd_ = -1;
FMT_POSIX_CALL(sopen_s(&fd_, path.c_str(), oflag, _SH_DENYNO, mode));
#else
FMT_RETRY(fd_, FMT_POSIX_CALL(open(path.c_str(), oflag, mode)));
#endif
if (fd_ == -1)
FMT_THROW(system_error(errno, "cannot open file {}", path.c_str()));
}
file::~file() FMT_NOEXCEPT {
// Don't retry close in case of EINTR!
// See http://linux.derkeiler.com/Mailing-Lists/Kernel/2005-09/3000.html
if (fd_ != -1 && FMT_POSIX_CALL(close(fd_)) != 0)
report_system_error(errno, "cannot close file");
}
void file::close() {
if (fd_ == -1)
return;
// Don't retry close in case of EINTR!
// See http://linux.derkeiler.com/Mailing-Lists/Kernel/2005-09/3000.html
int result = FMT_POSIX_CALL(close(fd_));
fd_ = -1;
if (result != 0)
FMT_THROW(system_error(errno, "cannot close file"));
}
long long file::size() const {
#ifdef _WIN32
// Use GetFileSize instead of GetFileSizeEx for the case when _WIN32_WINNT
// is less than 0x0500 as is the case with some default MinGW builds.
// Both functions support large file sizes.
DWORD size_upper = 0;
HANDLE handle = reinterpret_cast<HANDLE>(_get_osfhandle(fd_));
DWORD size_lower = FMT_SYSTEM(GetFileSize(handle, &size_upper));
if (size_lower == INVALID_FILE_SIZE) {
DWORD error = GetLastError();
if (error != NO_ERROR)
FMT_THROW(windows_error(GetLastError(), "cannot get file size"));
}
unsigned long long long_size = size_upper;
return (long_size << sizeof(DWORD) * CHAR_BIT) | size_lower;
#else
typedef struct stat Stat;
Stat file_stat = Stat();
if (FMT_POSIX_CALL(fstat(fd_, &file_stat)) == -1)
FMT_THROW(system_error(errno, "cannot get file attributes"));
static_assert(sizeof(long long) >= sizeof(file_stat.st_size),
"return type of file::size is not large enough");
return file_stat.st_size;
#endif
}
std::size_t file::read(void *buffer, std::size_t count) {
RWResult result = 0;
FMT_RETRY(result, FMT_POSIX_CALL(read(fd_, buffer, convert_rwcount(count))));
if (result < 0)
FMT_THROW(system_error(errno, "cannot read from file"));
return internal::to_unsigned(result);
}
std::size_t file::write(const void *buffer, std::size_t count) {
RWResult result = 0;
FMT_RETRY(result, FMT_POSIX_CALL(write(fd_, buffer, convert_rwcount(count))));
if (result < 0)
FMT_THROW(system_error(errno, "cannot write to file"));
return internal::to_unsigned(result);
}
file file::dup(int fd) {
// Don't retry as dup doesn't return EINTR.
// http://pubs.opengroup.org/onlinepubs/009695399/functions/dup.html
int new_fd = FMT_POSIX_CALL(dup(fd));
if (new_fd == -1)
FMT_THROW(system_error(errno, "cannot duplicate file descriptor {}", fd));
return file(new_fd);
}
void file::dup2(int fd) {
int result = 0;
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
if (result == -1) {
FMT_THROW(system_error(errno,
"cannot duplicate file descriptor {} to {}", fd_, fd));
}
}
void file::dup2(int fd, error_code &ec) FMT_NOEXCEPT {
int result = 0;
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
if (result == -1)
ec = error_code(errno);
}
void file::pipe(file &read_end, file &write_end) {
// Close the descriptors first to make sure that assignments don't throw
// and there are no leaks.
read_end.close();
write_end.close();
int fds[2] = {};
#ifdef _WIN32
// Make the default pipe capacity same as on Linux 2.6.11+.
enum { DEFAULT_CAPACITY = 65536 };
int result = FMT_POSIX_CALL(pipe(fds, DEFAULT_CAPACITY, _O_BINARY));
#else
// Don't retry as the pipe function doesn't return EINTR.
// http://pubs.opengroup.org/onlinepubs/009696799/functions/pipe.html
int result = FMT_POSIX_CALL(pipe(fds));
#endif
if (result != 0)
FMT_THROW(system_error(errno, "cannot create pipe"));
// The following assignments don't throw because read_fd and write_fd
// are closed.
read_end = file(fds[0]);
write_end = file(fds[1]);
}
buffered_file file::fdopen(const char *mode) {
// Don't retry as fdopen doesn't return EINTR.
FILE *f = FMT_POSIX_CALL(fdopen(fd_, mode));
if (!f)
FMT_THROW(system_error(errno,
"cannot associate stream with file descriptor"));
buffered_file bf(f);
fd_ = -1;
return bf;
}
long getpagesize() {
#ifdef _WIN32
SYSTEM_INFO si;
GetSystemInfo(&si);
return si.dwPageSize;
#else
long size = FMT_POSIX_CALL(sysconf(_SC_PAGESIZE));
if (size < 0)
FMT_THROW(system_error(errno, "cannot get memory page size"));
return size;
#endif
}
FMT_END_NAMESPACE

417
lib/fmt/posix.h Normal file
View file

@ -0,0 +1,417 @@
// A C++ interface to POSIX functions.
//
// Copyright (c) 2012 - 2016, Victor Zverovich
// All rights reserved.
//
// For the license information refer to format.h.
#ifndef FMT_POSIX_H_
#define FMT_POSIX_H_
#if defined(__MINGW32__) || defined(__CYGWIN__)
// Workaround MinGW bug https://sourceforge.net/p/mingw/bugs/2024/.
# undef __STRICT_ANSI__
#endif
#include <errno.h>
#include <fcntl.h> // for O_RDONLY
#include <locale.h> // for locale_t
#include <stdio.h>
#include <stdlib.h> // for strtod_l
#include <cstddef>
#if defined __APPLE__ || defined(__FreeBSD__)
# include <xlocale.h> // for LC_NUMERIC_MASK on OS X
#endif
#include "format.h"
#ifndef FMT_POSIX
# if defined(_WIN32) && !defined(__MINGW32__)
// Fix warnings about deprecated symbols.
# define FMT_POSIX(call) _##call
# else
# define FMT_POSIX(call) call
# endif
#endif
// Calls to system functions are wrapped in FMT_SYSTEM for testability.
#ifdef FMT_SYSTEM
# define FMT_POSIX_CALL(call) FMT_SYSTEM(call)
#else
# define FMT_SYSTEM(call) call
# ifdef _WIN32
// Fix warnings about deprecated symbols.
# define FMT_POSIX_CALL(call) ::_##call
# else
# define FMT_POSIX_CALL(call) ::call
# endif
#endif
// Retries the expression while it evaluates to error_result and errno
// equals to EINTR.
#ifndef _WIN32
# define FMT_RETRY_VAL(result, expression, error_result) \
do { \
result = (expression); \
} while (result == error_result && errno == EINTR)
#else
# define FMT_RETRY_VAL(result, expression, error_result) result = (expression)
#endif
#define FMT_RETRY(result, expression) FMT_RETRY_VAL(result, expression, -1)
FMT_BEGIN_NAMESPACE
/**
\rst
A reference to a null-terminated string. It can be constructed from a C
string or ``std::string``.
You can use one of the following typedefs for common character types:
+---------------+-----------------------------+
| Type | Definition |
+===============+=============================+
| cstring_view | basic_cstring_view<char> |
+---------------+-----------------------------+
| wcstring_view | basic_cstring_view<wchar_t> |
+---------------+-----------------------------+
This class is most useful as a parameter type to allow passing
different types of strings to a function, for example::
template <typename... Args>
std::string format(cstring_view format_str, const Args & ... args);
format("{}", 42);
format(std::string("{}"), 42);
\endrst
*/
template <typename Char>
class basic_cstring_view {
private:
const Char *data_;
public:
/** Constructs a string reference object from a C string. */
basic_cstring_view(const Char *s) : data_(s) {}
/**
\rst
Constructs a string reference from an ``std::string`` object.
\endrst
*/
basic_cstring_view(const std::basic_string<Char> &s) : data_(s.c_str()) {}
/** Returns the pointer to a C string. */
const Char *c_str() const { return data_; }
};
typedef basic_cstring_view<char> cstring_view;
typedef basic_cstring_view<wchar_t> wcstring_view;
// An error code.
class error_code {
private:
int value_;
public:
explicit error_code(int value = 0) FMT_NOEXCEPT : value_(value) {}
int get() const FMT_NOEXCEPT { return value_; }
};
// A buffered file.
class buffered_file {
private:
FILE *file_;
friend class file;
explicit buffered_file(FILE *f) : file_(f) {}
public:
// Constructs a buffered_file object which doesn't represent any file.
buffered_file() FMT_NOEXCEPT : file_(FMT_NULL) {}
// Destroys the object closing the file it represents if any.
FMT_API ~buffered_file() FMT_DTOR_NOEXCEPT;
#if !FMT_USE_RVALUE_REFERENCES
// Emulate a move constructor and a move assignment operator if rvalue
// references are not supported.
private:
// A proxy object to emulate a move constructor.
// It is private to make it impossible call operator Proxy directly.
struct Proxy {
FILE *file;
};
public:
// A "move constructor" for moving from a temporary.
buffered_file(Proxy p) FMT_NOEXCEPT : file_(p.file) {}
// A "move constructor" for moving from an lvalue.
buffered_file(buffered_file &f) FMT_NOEXCEPT : file_(f.file_) {
f.file_ = FMT_NULL;
}
// A "move assignment operator" for moving from a temporary.
buffered_file &operator=(Proxy p) {
close();
file_ = p.file;
return *this;
}
// A "move assignment operator" for moving from an lvalue.
buffered_file &operator=(buffered_file &other) {
close();
file_ = other.file_;
other.file_ = FMT_NULL;
return *this;
}
// Returns a proxy object for moving from a temporary:
// buffered_file file = buffered_file(...);
operator Proxy() FMT_NOEXCEPT {
Proxy p = {file_};
file_ = FMT_NULL;
return p;
}
#else
private:
FMT_DISALLOW_COPY_AND_ASSIGN(buffered_file);
public:
buffered_file(buffered_file &&other) FMT_NOEXCEPT : file_(other.file_) {
other.file_ = FMT_NULL;
}
buffered_file& operator=(buffered_file &&other) {
close();
file_ = other.file_;
other.file_ = FMT_NULL;
return *this;
}
#endif
// Opens a file.
FMT_API buffered_file(cstring_view filename, cstring_view mode);
// Closes the file.
FMT_API void close();
// Returns the pointer to a FILE object representing this file.
FILE *get() const FMT_NOEXCEPT { return file_; }
// We place parentheses around fileno to workaround a bug in some versions
// of MinGW that define fileno as a macro.
FMT_API int (fileno)() const;
void vprint(string_view format_str, format_args args) {
fmt::vprint(file_, format_str, args);
}
template <typename... Args>
inline void print(string_view format_str, const Args & ... args) {
vprint(format_str, make_format_args(args...));
}
};
// A file. Closed file is represented by a file object with descriptor -1.
// Methods that are not declared with FMT_NOEXCEPT may throw
// fmt::system_error in case of failure. Note that some errors such as
// closing the file multiple times will cause a crash on Windows rather
// than an exception. You can get standard behavior by overriding the
// invalid parameter handler with _set_invalid_parameter_handler.
class file {
private:
int fd_; // File descriptor.
// Constructs a file object with a given descriptor.
explicit file(int fd) : fd_(fd) {}
public:
// Possible values for the oflag argument to the constructor.
enum {
RDONLY = FMT_POSIX(O_RDONLY), // Open for reading only.
WRONLY = FMT_POSIX(O_WRONLY), // Open for writing only.
RDWR = FMT_POSIX(O_RDWR) // Open for reading and writing.
};
// Constructs a file object which doesn't represent any file.
file() FMT_NOEXCEPT : fd_(-1) {}
// Opens a file and constructs a file object representing this file.
FMT_API file(cstring_view path, int oflag);
#if !FMT_USE_RVALUE_REFERENCES
// Emulate a move constructor and a move assignment operator if rvalue
// references are not supported.
private:
// A proxy object to emulate a move constructor.
// It is private to make it impossible call operator Proxy directly.
struct Proxy {
int fd;
};
public:
// A "move constructor" for moving from a temporary.
file(Proxy p) FMT_NOEXCEPT : fd_(p.fd) {}
// A "move constructor" for moving from an lvalue.
file(file &other) FMT_NOEXCEPT : fd_(other.fd_) {
other.fd_ = -1;
}
// A "move assignment operator" for moving from a temporary.
file &operator=(Proxy p) {
close();
fd_ = p.fd;
return *this;
}
// A "move assignment operator" for moving from an lvalue.
file &operator=(file &other) {
close();
fd_ = other.fd_;
other.fd_ = -1;
return *this;
}
// Returns a proxy object for moving from a temporary:
// file f = file(...);
operator Proxy() FMT_NOEXCEPT {
Proxy p = {fd_};
fd_ = -1;
return p;
}
#else
private:
FMT_DISALLOW_COPY_AND_ASSIGN(file);
public:
file(file &&other) FMT_NOEXCEPT : fd_(other.fd_) {
other.fd_ = -1;
}
file& operator=(file &&other) {
close();
fd_ = other.fd_;
other.fd_ = -1;
return *this;
}
#endif
// Destroys the object closing the file it represents if any.
FMT_API ~file() FMT_DTOR_NOEXCEPT;
// Returns the file descriptor.
int descriptor() const FMT_NOEXCEPT { return fd_; }
// Closes the file.
FMT_API void close();
// Returns the file size. The size has signed type for consistency with
// stat::st_size.
FMT_API long long size() const;
// Attempts to read count bytes from the file into the specified buffer.
FMT_API std::size_t read(void *buffer, std::size_t count);
// Attempts to write count bytes from the specified buffer to the file.
FMT_API std::size_t write(const void *buffer, std::size_t count);
// Duplicates a file descriptor with the dup function and returns
// the duplicate as a file object.
FMT_API static file dup(int fd);
// Makes fd be the copy of this file descriptor, closing fd first if
// necessary.
FMT_API void dup2(int fd);
// Makes fd be the copy of this file descriptor, closing fd first if
// necessary.
FMT_API void dup2(int fd, error_code &ec) FMT_NOEXCEPT;
// Creates a pipe setting up read_end and write_end file objects for reading
// and writing respectively.
FMT_API static void pipe(file &read_end, file &write_end);
// Creates a buffered_file object associated with this file and detaches
// this file object from the file.
FMT_API buffered_file fdopen(const char *mode);
};
// Returns the memory page size.
long getpagesize();
#if (defined(LC_NUMERIC_MASK) || defined(_MSC_VER)) && \
!defined(__ANDROID__) && !defined(__CYGWIN__) && !defined(__OpenBSD__)
# define FMT_LOCALE
#endif
#ifdef FMT_LOCALE
// A "C" numeric locale.
class Locale {
private:
# ifdef _MSC_VER
typedef _locale_t locale_t;
enum { LC_NUMERIC_MASK = LC_NUMERIC };
static locale_t newlocale(int category_mask, const char *locale, locale_t) {
return _create_locale(category_mask, locale);
}
static void freelocale(locale_t locale) {
_free_locale(locale);
}
static double strtod_l(const char *nptr, char **endptr, _locale_t locale) {
return _strtod_l(nptr, endptr, locale);
}
# endif
locale_t locale_;
FMT_DISALLOW_COPY_AND_ASSIGN(Locale);
public:
typedef locale_t Type;
Locale() : locale_(newlocale(LC_NUMERIC_MASK, "C", FMT_NULL)) {
if (!locale_)
FMT_THROW(system_error(errno, "cannot create locale"));
}
~Locale() { freelocale(locale_); }
Type get() const { return locale_; }
// Converts string to floating-point number and advances str past the end
// of the parsed input.
double strtod(const char *&str) const {
char *end = FMT_NULL;
double result = strtod_l(str, &end, locale_);
str = end;
return result;
}
};
#endif // FMT_LOCALE
FMT_END_NAMESPACE
#if !FMT_USE_RVALUE_REFERENCES
namespace std {
// For compatibility with C++98.
inline fmt::buffered_file &move(fmt::buffered_file &f) { return f; }
inline fmt::file &move(fmt::file &f) { return f; }
}
#endif
#endif // FMT_POSIX_H_

Some files were not shown because too many files have changed in this diff Show more