Commit Graph

1215 Commits

Author SHA1 Message Date
Valentin Grünbacher
78f577686a Fix ArrayDestroy/DestroyStack erroring on null handle 2015-02-17 23:24:17 +01:00
HttrckCldHKS
c071f53f2c Add new hashers and new natives
Replace the only hasher called MD5 with the ones listed below.

(+) CRC32, MD5, SHA1, SHA256, SHA3 224 BIT, SHA3 256 BIT, SHA3 384 BIT,
SHA3 512 BIT, Keccak 224 BIT, Keccak 256 BIT, Keccak 384 BIT and Keccak
512 BIT.

Add the natives listed below.

(+) hash_string(const string[], hashType:type, output[], const
outputSize)
(+) hash_file(const fileName, hashType:type, output[], const outputSize)
(+) is_arkshine_a_doctor() :  Hidden native, but a sign of recompense
for him being very active since 1.8.3 version of AMX Mod X
(+) get_system_endianness() :  Checks if the system is currently Big
Endian or Little Endian.

Add the following Enum.

(+) hashType {}
(+) sysEndianness {}

Deprecate the following natives.

(-) amx_md5()
(-) amx_md5_file()

It has been tested on Windows and Linux. The sanity checks seems to be
properly working, so no worries about them.

These are useful if people are using Sockets, cURLs or MySQLs in order
to compare hashes of different files On-line for further investigation.
You are not able to check if the files are older or newer, but you can
see if the content is different (Hash Checksum mismatch).

I'm glad I did this. Thanks to
2015-02-16 14:39:45 +02:00
Vincent Herbet
7452317c10 Merge pull request #203 from Arkshine/fix/crash-on-shutdown
Fix crash by freeing memory the right way
2015-02-12 14:46:53 +01:00
Arkshine
120e5b94f9 Fix crash by freeing memory the right way 2015-02-12 14:37:46 +01:00
Vincent Herbet
4ec11496e6 Fix missing new lines in "amxx version" command 2015-02-12 10:46:20 +01:00
Arkshine
fb28b2d416 Fix missing parenthesis. 2015-02-11 00:18:22 +01:00
Arkshine
e99a1c8b09 Fix crash when cvar hook detour is not created 2015-02-10 23:19:03 +01:00
Vincent Herbet
7d084ee0bf Merge pull request #185 from Arkshine/feature/hooking-cvars
Introduce new features for cvars
2015-01-30 14:20:11 +01:00
Arkshine
1488b9747f Cvars: De-frenchify by Nextra 2015-01-29 21:44:53 +01:00
Arkshine
a5b5c7e9cd Cvars: Fix code to avoid Nextra be confused 2015-01-29 14:01:58 +01:00
Arkshine
f8baef15ca Cvars: Adjust more things
- Moved some functions in CvarManager
- Fixed detour enabled all the time
- Fixed bounds not properly handled
- Refreshed data of regisetered cvars at map change
2015-01-28 23:51:43 +01:00
Arkshine
187b187ef2 Cvars: To not traumatize Nextra 2015-01-28 00:58:07 +01:00
Arkshine
ac50f3ff34 Cvars: Check lower/upper bounds in create_cvar as well 2015-01-28 00:47:01 +01:00
Arkshine
e4a7e67783 Cvars: Adjust few things
- Hook is not as post, because allowing blocking change is not really that useful and this makes a context more simpler.
- Setting a min bound > max bound and reversely throw an error
- set_pcvar_bounds set cvar value on new min/max bound.
- Remove error "A cvar can't be binded with several variables", it's okay to no error such situation.
2015-01-28 00:26:24 +01:00
Arkshine
1a5e1928ec Cvars: Fix field orders and linux compilation 2015-01-27 16:27:26 +01:00
Arkshine
d75b14d4af Cvars: Extend "amxx cvars" command output 2015-01-27 15:07:17 +01:00
Arkshine
356a981164 Cvars: Add get/set_pcvar_bool natives 2015-01-26 14:26:48 +01:00
Arkshine
8a241ed0fd Cvars: Add new description param in get_plugins_cvar 2015-01-25 11:38:01 +01:00
Arkshine
cb0b9da51f Cvars: Add bind_pcvar_num/float/string 2015-01-24 21:31:00 +01:00
Arkshine
8ebb7be36d Cvars: Add get|set_pcvar_bounds natives 2015-01-24 15:04:49 +01:00
Arkshine
a05d0df50e Cvars: Add create_cvar native with more options (description, bounds) 2015-01-23 19:05:34 +01:00
Arkshine
15ad1d2247 Cvars: Moving cvars stuffs in its own files
cvars.cpp renamed to CvarManager.cpp
all cvars natives moved to a new cvars.cpp file
Pawn include is updated as wall.
2015-01-23 19:05:34 +01:00
Arkshine
768fa2c3bc Cvars: Add hook_cvar_change, [enable|disable]_cvar_hook natives 2015-01-23 19:05:33 +01:00
Arkshine
0db5963641 Cvars: Remove global forward 2015-01-23 19:05:33 +01:00
Arkshine
cdc7d550eb Cvars: Rearrange a bit some code
Changed class CCVar -> struct CvarInfo
Added CvarManager class and moved some code there
Code of registering a cvar is rewritten
Cvars datas are stored in a hashtable for fast lookup
For natives compatibility, an inline list is kept (though CList -> ke::InlineList)
Replace some CVAR_GET/SEt_ by FindVar
2015-01-23 19:05:32 +01:00
Arkshine
f973f5beb7 Cvars: Convert CString to ke::AString in CCVar class 2015-01-23 19:05:32 +01:00
Arkshine
6619176a76 Cvars: Move CCVar class to cvars.h 2015-01-23 19:05:31 +01:00
Arkshine
faeaf9259e Cvars: Add OnCvarChanged global forward
I really tried to use "cvar_changed" as name, but it bothered me so much to look that weird I could not keep it.
2015-01-23 19:05:31 +01:00
Arkshine
34d91789c4 Cvars: Hook Cvar_DirectSet from engine library 2015-01-23 19:05:30 +01:00
Arkshine
cdfd789f56 Rename change_level to engine_changelevel 2015-01-23 16:55:16 +01:00
Arkshine
dd9975cd67 Rename msvc10 directories to msvc12 2015-01-14 10:31:33 +01:00
Arkshine
97369c5d6c Upgrade VS projetcs to use v120_xp toolset and fix missing include paths 2015-01-14 10:25:46 +01:00
Vincent Herbet
7f71cfaee7 Merge pull request #165 from Arkshine/feature/add-version-lib-and-missing-rc
Update versioning system and add missing module RC file (bug 6222)
2015-01-07 18:59:51 +01:00
Arkshine
7c96c30be8 Replace old SVN_* defines by the new ones 2014-12-08 01:42:42 +01:00
Arkshine
1146bcad2c C++11: Fix some code 2014-12-06 14:02:55 +01:00
Arkshine
4ffd847b7a Fix typo in get_user_name() where hostname was returned as blank string 2014-11-13 19:01:26 +01:00
Vincent Herbet
5f824d64da Merge pull request #150 from Arkshine/add-reset_menu
Allow show_menu native to send empty text + add reset_menu stock (bug 6244)
2014-10-25 12:00:08 +02:00
Vincent Herbet
79479e40c6 Merge pull request #151 from Arkshine/add-msg_init-support
Add MSG_INIT support in message_begin native (bug 6254)
2014-10-25 11:45:02 +02:00
Arkshine
1bd022305f Add MSG_INIT support in messsage_begin native (bug 6254) 2014-10-24 21:04:42 +02:00
Arkshine
d0ab27092c Allow show_menu native to send empty text and add reset_menu stock (bug 6244) 2014-10-24 20:36:38 +02:00
Arkshine
9cf4564057 Fix linux warning in previous commit 2014-10-24 11:25:52 +02:00
HttrckCldHKS
d1c0b8fea6 Improving Code 2014-10-18 11:09:49 -07:00
HttrckCldHKS
82cbc94f27 Improving Code 2014-10-18 10:58:26 -07:00
HttrckCldHKS
59a1b018ed Improving Code 2014-10-18 10:34:03 -07:00
HttrckCldHKS
aa963603ed Adding New Game Modifications Due Colored Menus
Adding New Game Modifications Due Colored Menus.
2014-10-18 10:09:11 -07:00
Valentin Grünbacher
41d7554efd Fix recursion issues with show_menu and newmenus 2014-10-11 00:35:05 +02:00
WildCard65
a676d9ea52 Fix typo in modules.cpp
Ya...
2014-09-19 20:45:44 -04:00
Vincent Herbet
204004b90e Merge pull request #112 from Arkshine/deduplicate-files
Deduplicate a number of files used by modules by moving them to the public directory
2014-08-23 10:00:13 +02:00
Vincent Herbet
bd08cc5126 Merge pull request #126 from Arkshine/feature-find-player-engclient_print
Allow some natives to be used on connecting players (bug 6229).
2014-08-19 18:35:52 +02:00
Arkshine
bf23890a34 Reverse condition for clarity and to make Nextra happy! 2014-08-19 18:25:00 +02:00
Arkshine
68aec7eec0 Use new flags in get_players/find_player instead to avoid breakage. 2014-08-19 15:39:06 +02:00
Arkshine
76811b7b84 Allow get_players() as well. 2014-08-19 10:08:25 +02:00
Arkshine
481e1528d6 Don't show blank line in abort() with AMX_ERR_NONE (bug 6233). 2014-08-17 23:33:00 +02:00
Arkshine
33c0a676fd Allow find_player() and engclient_print() (in console) to be used on connecting players (bug 6229). 2014-08-17 23:31:46 +02:00
Arkshine
41f6932b68 Remove some SourceMod namespace. 2014-08-10 22:25:14 +02:00
Arkshine
c497d478ce Move out base sdk folder into public directory. 2014-08-09 17:35:08 +02:00
Arkshine
2c146f564e Fix missing backward compatibility for some Array natives. 2014-08-09 15:22:18 +02:00
Vincent Herbet
570c9cfc6b Merge pull request #110 from Arkshine/replace-more-snprintf
Replace more snprintf by UTIL_Format.
2014-08-08 20:38:38 +02:00
Arkshine
b47aa6871d Replace more snprintf by UTIL_Format. 2014-08-08 12:47:15 +02:00
Arkshine
eeb4ecd109 Update project files. 2014-08-08 11:27:40 +02:00
Vincent Herbet
a7d94a4859 Merge pull request #107 from Arkshine/Fix-array-compatibility-issue
Fix a compatibility issue with the "reserved" parameter.
2014-08-07 21:38:51 +02:00
Arkshine
72b514cdde Make sure reserved parameter is a not a negative value. 2014-08-07 21:31:53 +02:00
Arkshine
aa4e60ae27 Fix a compatibility issue with the "reserved" parameter. 2014-08-07 20:40:07 +02:00
Arkshine
c03271c856 Use server language as fallback if client's "lang" key is not defined. 2014-08-07 14:20:29 +02:00
Arkshine
69c46aff80 Replace all snprintf with UTIL_Format. 2014-08-07 01:42:58 +02:00
Vincent Herbet
d3bc58d80b Merge pull request #101 from Arkshine/textparsers
Introduce TextParser API
2014-08-07 01:24:51 +02:00
Vincent Herbet
c72d130fde Merge pull request #104 from Arkshine/add-change_level
Add change_level() native.
2014-08-07 01:24:36 +02:00
Arkshine
a0852adf18 Fix wrong log error message. 2014-08-07 00:53:15 +02:00
Arkshine
6da2078067 Replace snprintf by UTIL_Format. 2014-08-07 00:51:01 +02:00
Arkshine
8d2770f2f2 Put back original SM headers. 2014-08-07 00:43:29 +02:00
Arkshine
3369f6d115 Update license in pawn includes and add them in project files. 2014-08-06 09:24:09 +02:00
Arkshine
4b652198f0 Fix compilation. 2014-08-06 09:17:54 +02:00
Arkshine
2d07189e38 Fix few issues. 2014-08-06 09:17:53 +02:00
Arkshine
287cc1a0e8 Update MakeFile. 2014-08-06 09:17:50 +02:00
Arkshine
037af0aec2 Split INI/SMC API. 2014-08-06 09:17:47 +02:00
Arkshine
0cf5a2e12f Expose ParseFile_INI to API.
Some minor changes have been made in parser:

- Added ReadINI_ParseStart and ReadINI_ParseEnd call.
- Function returns SMCResult instead of bool. To avoid unecessary complexity and duplicating natives, this feels more appropriate to let these functions to share some SMCResult and SMCParse constants. Since properly documented, this should be ok.
- Made sure curtok is set to 0 when ptr_val is null, otherwise unexpected value would be passed into the forward.
2014-08-06 09:17:45 +02:00
Arkshine
9af7931a79 Introduce TextParser API. 2014-08-06 09:17:43 +02:00
Arkshine
10d5c8e9ad Add change_level() native. 2014-08-05 09:49:32 +02:00
Scott Ehlert
9c08b11a75 Update 'amxx gpl' server command with new license text. 2014-08-04 14:31:28 -05:00
Scott Ehlert
1bb54f839e Update license headers for AMXX core. 2014-08-04 13:18:19 -05:00
Vincent Herbet
5ddd37eb77 Merge pull request #97 from Arkshine/expose-set_amxstring_utf8
Expose set_amxstring_utf8 to AMXX API
2014-08-02 21:11:23 +02:00
Vincent Herbet
102f88674b Merge pull request #95 from Arkshine/update-project-files
Update project files.
2014-08-02 13:53:18 +02:00
Arkshine
3b6726e0c7 Update project files. 2014-08-02 13:51:17 +02:00
Arkshine
f43570c964 Fix typo and remove unecessary line. 2014-08-02 13:45:31 +02:00
Arkshine
b5fe5d29c9 Add MF_SetAmxStringUTF8Char and MF_SetAmxStringUTF8Cell. 2014-08-02 13:42:14 +02:00
Arkshine
c3c5149fa0 Add new line at the end of file. 2014-08-01 23:20:29 +02:00
Arkshine
e7b7506efa Introduce API to create Stack structures 2014-08-01 23:14:44 +02:00
Arkshine
4ab559ceef Fix various issues. 2014-08-01 22:08:45 +02:00
Arkshine
bbc83291ef Add new format parameters. 2014-08-01 18:55:07 +02:00
Vincent Herbet
47dc226393 Merge pull request #76 from Arkshine/improve-cellarray
Update dynamic Array.
2014-08-01 18:03:53 +02:00
Arkshine
eabafd4eed Fix typo, documention and others issues. 2014-08-01 09:21:26 +02:00
Vincent Herbet
d2595b8b92 Merge pull request #31 from xPaw/burn-baby-burn
Remove compatibility stuff from the core
2014-07-27 12:07:58 +02:00
Vincent Herbet
88042ce5a9 Merge pull request #82 from xPaw/ml-plugin-update
Multilingual plugin update
2014-07-27 11:57:51 +02:00
Vincent Herbet
87c0be470b Merge pull request #80 from xPaw/package-script
Package script fixes
2014-07-27 11:44:56 +02:00
xPaw
5d85c0a965 Update VS references to amxmodx_version.inc 2014-07-27 11:59:49 +03:00
xPaw
60b1ec222e Add extern amxmodx_language 2014-07-27 11:52:30 +03:00
xPaw
b4d006438c Update core to use amx_language cvar instead of vault 2014-07-27 11:42:34 +03:00
xPaw
ef1e1edea5 Update copyright year 2014-07-27 11:22:40 +03:00
Arkshine
42fa547cb4 Improve CellArray. 2014-07-25 21:28:23 +02:00
Arkshine
8cef1af95d Move check out the loop. 2014-07-19 19:54:57 +02:00