41 Commits

Author SHA1 Message Date
Vincent Herbet
605d1a5b1e
Fix callback from amx_clientcmd not working properly (#518) 2018-08-25 09:18:39 +02:00
Vincent Herbet
ab854ec035 Improve UTF-8 support in some natives (bug 6475) (#407)
* Compile as static library, update AMBuildScript and link to core

* Update VS project files to include the library

* Add UTF-8 Rewind library (v1.5.1) to third_party directory

* Update ACKNOWLEDGEMENTS.txt

* Move AMXX buffer in its own function

* Move constants from string.inc to string_const.inc and update project files

* Move stocks from string.inc to string_stocks.inc and update project files

* Improve UTF-8 support in containi() and update documentation

* Improve UTF-8 support in strcmp() and update documentation

* Improve UTF-8 support in strfind() and update documentation

Worth to be noted that this native with ignorecase set was not working properly. So broken that no one reported the issue.
This adds also a safety check for "pos" parameter to not go < 0.

* Improve UTF-8 support in strncmp() and update documentation

* Improve UTF-8 support in equali() and update documentation

* Add an option to some UTF-8 Rewind functions for avoiding invalid data to be replaced

By default it replaces any invalid byte or sequence of bytes by 0xFFFD (3 bytes). It can be problematic when the input buffer is not changed (from a plugin) and that some natives need to calculate a position from the converted string. With such replacement, the position is displaced due the final string length being larger.

This compiles the library as C++, because I added some silly param with a default default value which is not supported by C.

* Improve UTF-8 support in replace_string/ex() and update documentation

* Add is_string_category() and update documentation

* Update a little testsuite plugin (and fix linux compilation)

* Add mb_strotolower/upper() and update documentation

* Add mb_ucfirst() and update documentation

* Add mb_strtotile() and update documentation

* Improve UTF-8 support in get_players() and find_player() with name/case insenstive flags set

* Fix KliPPy's complain
2017-08-05 10:32:16 +02:00
Vincent Herbet
6bd2f1feec Fix a engclient_cmd and amxclient_cmd buffer issue (#438) 2017-07-21 23:44:05 +02:00
Arkshine
2099a88ddf Fix UTIL_ReplaceAll not properly tracking length. 2016-06-06 12:09:42 +02:00
Arkshine
c29eabec50 Fix max length inconsistencies + typo 2015-10-05 19:12:30 +02:00
Arkshine
138b9e1510 Remove UTIL_Format() and UTIL_VarArgs() 2015-10-05 19:12:08 +02:00
Arkshine
0005d1a6b5 Update AMTL submodule from upstream and reflect changes 2015-08-26 11:15:07 +02:00
Arkshine
c775cfca73 More AMTL conversion - 🔥 CString and CVector 2015-07-13 23:37:20 +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
69c46aff80 Replace all snprintf with UTIL_Format. 2014-08-07 01:42:58 +02:00
Scott Ehlert
1bb54f839e Update license headers for AMXX core. 2014-08-04 13:18:19 -05:00
Arkshine
bbc83291ef Add new format parameters. 2014-08-01 18:55:07 +02:00
Arkshine
eabafd4eed Fix typo, documention and others issues. 2014-08-01 09:21:26 +02:00
Arkshine
42fa547cb4 Improve CellArray. 2014-07-25 21:28:23 +02:00
Arkshine
9c191949d8 Add amxclient_cmd native (bug 5887, r=Nextra) 2014-05-02 09:16:16 +02:00
Arkshine
a86ca1491f Add new string natives/stocks, make some UTF-8 safe (bug 6110, r=ds) 2014-04-30 09:33:03 +02:00
Arkshine
5468e9745c Add set/show_dhudmessage (bug 5979, r=ds) 2014-04-11 21:54:24 +02:00
connorr
9971541d78 Fix linux warning to make GCC compiler happy
Former-commit-id: f23bda76a3bb25333a619e82703605ac1cc92308
2013-08-24 23:42:18 +02:00
Vincent Herbet
af0a1200ab Add client_print_color native (CS only) (bug 5823, r=Nextra)
Former-commit-id: 9e37c60bc543676cbd659621a129bd953fc71473
2013-08-24 01:03:13 +02:00
Scott Ehlert
40c1fee55a Added support for Mac OS X and building with clang (bug 5601, r=dvander). 2013-02-13 01:14:37 -06:00
Scott Ehlert
81ac41037b GCC Wallification 2006-08-27 02:17:18 +00:00
David Anderson
bab5bb5a72 Attempt to fix up am41036 2006-08-24 21:13:52 +00:00
Borja Ferrer
ebd4974c75 final cleaned revision (I hope) 2005-09-16 23:48:51 +00:00
Borja Ferrer
76760b221d more cleaned-up code 2005-09-10 20:09:14 +00:00
David Anderson
13b6c0764c Added request at15060 by twistedeuphoria 2005-07-07 19:53:02 +00:00
David Anderson
611ad2be94 Malformat bug fixes, RC version bump 2005-07-06 03:20:00 +00:00
Pavol Marko
f06796c275 Changed so that a MOTD will also display when there is no ServerName message (as proposed by karlos on the forums). 2004-08-31 13:20:29 +00:00
Pavol Marko
538876a82c Reenabled engclient_cmd code 2004-07-25 18:45:44 +00:00
David Anderson
cf137b54ad PM's fix: engclient_cmd is now client_cmd 2004-06-28 18:54:58 +00:00
Pavol Marko
9307994060 Cleaned up some code, added checks for msgid != 0 (so AMXX doesn't crash mods which don't support text based menus for example) 2004-05-28 11:29:44 +00:00
Pavol Marko
f8f553d485 nothing important 2004-04-21 19:14:16 +00:00
David Anderson
4f4c87d9b2 Removed all warnings. 2004-04-01 05:53:22 +00:00
Pavol Marko
cdbfcdc4c4 logging functions moved from util.cpp to amxxlog.cpp; renamed to AMXXLOG_*; AMXXLOG_Init added (called from Meta_Attach)
UTIL_GetModulesNum moved to modules.cpp and renamed to countModules
2004-03-27 17:01:18 +00:00
Pavol Marko
cfb45c1302 added UTIL_GetModulesNum function 2004-03-24 18:33:41 +00:00
David Anderson
f711baf3df new file names 2004-03-24 01:35:44 +00:00
Pavol Marko
f4a729e85a cpp std lib depedencies removed 2004-03-14 14:05:44 +00:00
Felix Geyer
7cf7fce86d changed header 2004-03-05 21:03:14 +00:00
David Anderson
f95f15a995 Quick changes... 2004-03-05 20:18:28 +00:00
Pavol Marko
e72a36dd37 added central logging system, callfunc natives 2004-03-04 18:16:51 +00:00
Felix Geyer
8c6374567a updated header 2004-02-21 19:36:35 +00:00
Felix Geyer
9e999a0ba6 Initial revision 2004-01-31 20:56:22 +00:00