Commit Graph

5477 Commits

Author SHA1 Message Date
David Anderson
7fb6440ce9 Update minimum macOS to 10.7. 2021-07-11 20:55:09 -07:00
David Anderson
1a1b16614a Switch to libc++ on mac. 2021-07-11 20:51:19 -07:00
David Anderson
af32a9790b Switch to Python3 for bootstrapping. 2021-07-11 17:30:38 -07:00
Sergey Shorokhov
2e5e3ce060
Add month and year support to get_time_length() (#969)
* Add RU

* Add EN

* Add DE

* Add SR

* Add BP

* Add HU

* Add SECONDS_IN_MONTH & timeunit_months

* Add months for API description

* Add SECONDS_IN_YEAR & timeunit_years

* fix typo

* Add FR
2021-07-01 10:51:24 +02:00
FEDERICOMB
c58daeafca
Fix stock "SQL_QueryAndIgnore" documentation (#965) 2021-06-19 10:38:25 +02:00
Fysiks
7fef58c374
Fix for loop index out of bounds error (#966)
Fixes an index out of bounds error when refreshMenus() and subsequently findAdminsWithMenu() is called when there is 32 players in the server. Indexing the playersList array in the for loop condition causes it to try to index with a value of 32 on the very last condition check which is not valid for this array.
2021-06-19 10:36:56 +02:00
Fysiks
3c1856f7af
Add ignore for amxx binaries (#960) 2021-05-06 20:40:48 -07:00
ArKaNeMaN
9fbf91ded0
Fixed a typo in open_dir native (#955)
dir[] parameter is not const, but it never changes.
2021-03-25 10:04:00 -07:00
Vincent Herbet
3d517d69e2
Revert "Update meta_api.cpp (#883)" (#950)
This reverts commit 7cb045c688.
2021-03-12 18:36:40 +01:00
shel
70d1aff519
Revert "Resolve old bot's connection state issues (#917)" (#949)
This reverts commit bee4b47b07.
2021-03-12 18:31:01 +01:00
shel
bee4b47b07
Resolve old bot's connection state issues (#917)
* final bot's fixes

Fixes: #916
Fixes: #883
Fixes: #875

* suggestions

* suggestions

Co-authored-by: shel <2@shelru.ru>
2021-03-09 23:10:59 +01:00
David Anderson
8c6b0f84bb Fix Windows build. 2021-02-10 13:32:02 -08:00
shel
a4e929eedc
Possible memory leaks on deattach (#912)
Co-authored-by: shel <2@shelru.ru>
2020-12-06 12:09:57 -08:00
Franco Romaniello
c81f68aac3
Update cvars.inc (#919) 2020-12-06 12:01:52 -08:00
shel
03f4c7dd2c
Update checkout-deps.sh (#915) 2020-12-06 11:59:11 -08:00
shel
7cb045c688
Update meta_api.cpp (#883)
Fixes: #875
2020-11-22 18:02:53 -08:00
shel
73f3afa95f
push (#911)
Co-authored-by: shel <2@shelru.ru>
2020-11-22 15:43:17 -08:00
shel
2fadf887e6
Return max heap size note (#910)
Co-authored-by: shel <2@shelru.ru>
2020-11-22 15:12:54 -08:00
WildCard65
1027df054a
Updated 'checkout-deps' to check for 'pip'/'pip3' prior to installing 'AMBuild' (#897) 2020-07-31 14:33:28 -07:00
shel
2e3c105c7d
Pass menu ID in MPROP_PAGE_CALLBACK function (#885)
Co-authored-by: shel <2@shelru.ru>
2020-07-17 11:05:13 +02:00
shel
ff2fc19b08
Update newmenus.cpp (#884)
Fixes: #881

Co-authored-by: shel <2@shelru.ru>
2020-07-17 01:57:29 +02:00
shel
f4fefd0bb4
Fix uninitialized member unexpected results (#896)
Co-authored-by: shel <2@shelru.ru>
2020-07-16 16:40:31 -07:00
Vincent Herbet
b26118006a
Revert "Do not allow admins to change cvars with FCVAR_SPONLY flag when not in singleplayer via amx_cvar"
adbc3e0c53

Behavior change. For now reverting it to give time and decide how it should be handled properly.
2020-06-24 22:49:19 +02:00
Vincent Herbet
ed1ab00faf
Fix internal player's team id returning -1 in a specific but valid situation (#772)
* Fix internal player's team id returning -1 in a specific but valid situation

* Use a local variable

* Fix spaces
2020-06-03 23:53:26 +02:00
Vincent Herbet
6d6a41b894
Improve AdminSlot plugin (#631)
* Adminslot: Trim spaces

* Adminslot: Use semicolon everywhere

* Adminslot: Use brackets everywhere

* Adminslot: Hook cvars change and make sure max visible players is set right away

* Adminslot: Rename g_sv_visiblemaxplayers

* Adminslot: Move free slot calculation in its own function

* Adminslot: Use create_cvar and define appropriate bounds

* Adminslot: Use get_playersnum_ex with flag for clarity

* Adminslot: Move all the logic inside setVisibleSlots

Looks like the commit should have been split for clarity.

The initial purpose is to avoid code duplication and regroup checks.
The logic is the same with a little improvement to handle situations where a cvar is changed on-the-fly and sv_visiblemaxplayers needs to be reset.

Ultimately, the logic is the following:

 - At player's connection:
 -- Do nothing if amx_reservation == 0 and sv_visiblemaxplayers <= 0. If sv_visiblemaxplayers is set, we reset it directly.
 -- Check if player needs to be kicked. If not, and amx_hideslots == 0, then do nothing.
 -- Otherwise we update sv_visiblemaxplayers

 - Others events:
 -- Do nothing if either amx_reservation == 0 or amx_hideslots == 0, and if sv_visiblemaxplayers <= 0. If sv_visiblemaxplayers is set, we reset it directly.
 -- Otherwise we update sv_visiblemaxplayers

* Adminslot: Rename variables and adjust constantness

* Adminslot: Add a description to the cvars

* Adjust CVAR_HIDESLOTS english sentence

* Add the Deutsch translations
2020-06-03 23:52:47 +02:00
shel
b9b4001bf9
Add menu_item_setaccess native (#826)
* Add set access.

* Update newmenus.inc

* typo

* Update newmenus.inc
2020-05-29 21:40:35 +02:00
KAWAI
1bc342a692
Public vars for plugin data (#714)
* Add public vars for plugin data and small refactoring get_xvar_id native

* Add new command to display info about the plugin and add url to amxx plugins command

* Add optional args to register_plugin native (url, description)

* Add enum of args for register_plugin native

* Creating a variable inside an if statement (C++17)

* Displaying the URL of the plugin if it is present

* Getting an ID only with more than three arguments

* Creating a variable inside an if statement (C++17)

* Fix typo

* Revert "Creating a variable inside an if statement (C++17)"

This reverts commit 835e0bc6c413f11b1bbf964daea87b57f653f5d7.

* Revert "Creating a variable inside an if statement (C++17)"

This reverts commit b2c1e7c77576c02a00c8c3f103457000d3298ceb.

* Revert "Displaying the URL of the plugin if it is present"

This reverts commit 9e31230368449966d16635c696d97c04adadeaa9.

* Binary compatibility for previously compiled plugins

* Displaying the URL of the plugin if it is present

* Quotation marks replaced by square brackets and change arg name to id

* Fix getting url

* The 'atoi' function replaced to 'stoi'

* Add likely/unlikely defines for using built-in function provided by GCC

* Small fixes with auto and inconsistent var name

* Replace stoi to strtol function

* Removed explicit buffer id

* Revert "Add likely/unlikely defines for using built-in function provided by GCC"

This reverts commit 94cee479ed245b98195501466850d01a3f08fd13.

* Add url and description params to get_plugin function
2020-05-29 12:37:40 +02:00
regener
368bde1d07
Yet another Hungarian langugage revise (#816)
Revised by Norbee. @ ebateam.eu

He was just lazy to do a PR :P
2020-05-29 01:13:38 +02:00
Juice
51ede1097d
admincmd.sma exploits fix (#822)
* [admincmd.sma] Fix typo in isCommandArgSafe

'

* [admincmd.sma] Update amx_cvar command handler

- Fix exploiting of "mapchangecfgfile" cvar to execute potentially dangerous console commands
- Add newline delimiter check and restrict for ****cfgfile cvars values

* Restrict having ".." character sequence in amx_map command argument

Fixes exploit on Windows servers that allows executing potentially dangerous console commands

* Do not allow admins to change cvars with FCVAR_SPONLY flag when not in singleplayer via amx_cvar

1. Make amx_cvar command obey FCVAR_SPONLY flag.
2. Fix exploiting of amx_nextmap cvar value which is used in nextmap plugin.
2020-05-29 01:10:38 +02:00
Juice
a5f2b5539f
adminvote.sma exploit fix (#823)
* Restrict having ".." character sequence in amx_votemap command arguments

Fixes exploit on Windows servers that allows executing potentially dangerous console commands

* Fix typo

containi -> contain
2020-05-29 01:04:16 +02:00
diamond-optic
307e71455a
Fix broken DoD Fun module natives (#851)
* Update hardcorded offsets

* Fixed using incorrect parameter for setting string
2020-05-29 00:54:36 +02:00
Eren Kaya
b60f58ac34
Turkish Translation Fixes/Addings (#862)
* Update admin.txt

Fixed translation [tr]

* Update adminchat.txt

* Update admincmd.txt

* Update adminhelp.txt

* Update adminslots.txt

* Update adminvote.txt

* Update antiflood.txt

* Update cmdmenu.txt

* Update common.txt

* Update imessage.txt

* Update mapchooser.txt

* Update menufront.txt

* Update mapsmenu.txt

* Update miscstats.txt

* Update multilingual.txt

* Update nextmap.txt

* Update pausecfg.txt

* Update plmenu.txt

* Update restmenu.txt

* Update scrollmsg.txt

* Update stats_dod.txt

* Update statscfg.txt

* Update telemenu.txt

* Update time.txt

* Update timeleft.txt

* Update statsx.txt

* Update adminhelp.txt

* Update admincmd.txt
2020-05-29 00:51:14 +02:00
Vincent Herbet
6ef40779e7
Add missing is_user_authorized() native (#840)
* Add missing is_user_authorized() native

It is implemented in core, but missing in amxmodx.inc

* Fix typo
2020-03-05 14:52:14 +01:00
Vincent Herbet
18a5f6f5ea
Fix MySQL connector link (#844) 2020-03-04 21:10:41 +01:00
shel
d3ef881f31 Fix unreachable code warning in constraint_offset() (#784) 2019-12-20 11:17:08 +01:00
Cleverson
0eba9b3708 Close cmdaccess.ini file if fopen found the file... (#815)
Close file if fopen found the file...
2019-12-20 11:12:46 +01:00
Vitaly Karpenko
0ccba67006 Fix compilation with GCC 8.2+ (#617)
* GCC 8.2 support

* Add GCC version check

* -Werror=class-memaccess fix in code

* Use assignment for Stats
2019-10-29 21:48:31 +01:00
Vincent Herbet
c86813697a
Fix new lines with TextMsg and SayText (side-effect of #763) (#778)
* Fix newlines for TextMsg

* Fix newlines for SayText

* Adjust comments

* Replace hardcoded detination value with HUD_* constants

* Make sure only official mods can use format string

* Fix typos

* Split condition for readability

* CS only: Fix newlines in TextMsg and with print_center
2019-10-28 00:21:09 +01:00
Arkshine
4f6b779bf4 Adjust TextMsg/SayText maximum buffer length from 190 to 187 due to "%s" parameter added in #763 2019-10-23 16:27:26 +02:00
Juice
d819df80f9 Fix issues with amxclient_cmd and read_args/read_argv* natives (#761)
* Fixes to read_args and read_argv* natives

* Fixed crash with read_argv* natives and commands sent with amxclient_cmd native
* Fixed read_args returning argv[0] instead of empty string when both amxclient_cmd's arguments were not specified

* Fix spaces
2019-10-22 10:28:40 +02:00
Vincent Herbet
5120deaf74
Update gamedata for all supported mods (#771)
* Update CS gamedata

* Update TFC gamedata

* Update DoD gamedata

* Update Valve gamedata

* Update Gearbox gamedata
2019-10-21 11:49:30 +02:00
Vincent Herbet
d01aa5762f
Fix behavior change about endianness check in maxmind/libmaxminddb#123 (#770) 2019-10-20 23:21:57 +02:00
twisterniq
8930ecf7c5 Add new plugin defines regarding the AMX Mod X version (#723)
* Add AMXX_VERSION_LOCAL define

* Add new defines regarding version of AMX Mod X

Added new defines: AMXX_VERSION_MAJOR_NUM and AMXX_VERSION_MINOR_NUM

* Rename AMXX_VERSION_LOCAL define

Define AMXX_VERSION_LOCAL was renamed to AMXX_VERSION_LOCAL_REV_NUM
2019-10-17 18:55:05 +02:00
Smilex_Gamer
aa06e5ab93 European Portuguese Language translation support (#750)
* Added European Portuguese translation: admin.txt

* Added European Portuguese translation: adminchat.txt

* Added European Portuguese translation: admincmd.txt

* Added European Portuguese translation: adminhelp.txt

* Added European Portuguese translation: adminslots.txt

* Added European Portuguese translation: adminvote.txt

* Added European Portuguese translation: antiflood.txt

* Added European Portuguese translation: cmdmenu.txt

* Added European Portuguese translation: common.txt

* Added European Portuguese translation: imessage.txt

* Added European Portuguese translation: languages.txt

* Added European Portuguese translation: mapchooser.txt

* Added European Portuguese translation: mapsmenu.txt

* Added European Portuguese translation: menufront.txt

* Added European Portuguese translation: miscstats.txt

* Added European Portuguese translation: multilingual.txt

* Added European Portuguese translation: nextmap.txt

* Added European Portuguese translation: pausecfg.txt

* Added European Portuguese translation: plmenu.txt

* Added European Portuguese translation: restmenu.txt

* Added European Portuguese translation: scrollmsg.txt

* Added European Portuguese translation: stats_dod.txt

* Added European Portuguese translation: statscfg.txt

* Added European Portuguese translation: statsx.txt

* Added European Portuguese translation: telemenu.txt

* Added European Portuguese translation: time.txt

* Added European Portuguese translation: timeleft.txt
2019-10-17 15:46:04 +02:00
Vincent Herbet
8309a1e06b
Send pre-formatted string in SayText and TextMSg as a parameter instead of as the format string (#763) 2019-10-17 15:42:46 +02:00
Vincent Herbet
7a44e6ec66
Fix GeoIP2 database file extraction (#764) 2019-10-17 15:42:27 +02:00
Dmitry Novikov
0bd69445f9 CSPForward::execute: Fix uninitialized retVal (#747) 2019-08-02 09:47:38 +02:00
Vincent Herbet
5a257a7a42
Merge pull request #664 from IgnacioFDM/add-sqdistance
Add square distance functions to xs.inc
2019-06-19 22:37:56 +02:00
Vincent Herbet
136cc23463
Merge pull request #698 from CrXane/master
Albanian Language translation support
2019-06-19 22:36:06 +02:00
Vincent Herbet
024003d6f0
Fix MPROP_SHOWPAGE option not working as expected (#726)
Typo from #473.
2019-06-19 22:26:03 +02:00