Commit Graph

7019 Commits

Author SHA1 Message Date
Rain
f9ec38103a
Use auth strings when banning from menu
When an admin initiates a ban from a BaseBans GUI menu, track players by
their AuthId (SteamID) instead of userid, so that the admin is able to
target players who disconnect after that menu was constructed.

If the target player is still connected, use their userid to ban the
same as before this commit.

If the target has disconnected, write a ban using their stored AuthId
value, as with "sm_addban".

This commit also revertss the `(admin==0)` check from PrepareBan that
was mistakenly added by bf7212889b,
because it would prevent banning from server/RCON (client index 0).
2023-10-15 19:56:51 +03:00
Rain
bf7212889b Fix invalid client index in Basebans menu
Fix #1768

The `sm_admin`-triggered Menu flow for banning players is caching client
indices inside the basebans.sp `PlayerInfo` struct, and can then
incorrectly use them in the menu callback without checking for the
related client's UserId validity. This leads to bug #1768 occurring when
the ban target player disconnects from the server before the banning
admin could complete the banmenu UI flow.

Since the related menu callbacks can't rely on the cached client index,
I have removed the basebans.sp `PlayerInfo.banTarget` member entirely,
in favor of the `PlayerInfo.banTarget`, and instead call
`GetClientOfUserId(...)` to get & validate the target client index where
necessary. The `PrepareBan(...)` function has been refactored to take a
ban target UserId (instead of the target client index) accordingly.
2023-05-11 23:56:40 +03:00
Dysphie
97f2fc9d7f
Increase Cookie.GetInt/SetInt buffer size (#1995)
Current implementation does not account for negative sign or null term
2023-04-22 01:19:36 -07:00
Vauff
2e1235a585
A2S_Rules fix: Move MTU patch value to gamedata (#1829)
* A2S_Rules fix: Move MTU patch value to gamedata and increase it

* Revert MTU value back to 5k
2023-04-19 15:28:40 +00:00
Corey D
426c1a090f
Fix CommandListener ignoring Plugin_Handled (#1819) 2023-04-19 16:44:34 +02:00
Corey D
50b4ad4e11
Make KeyValues.Rewind traversal-stack clearing optional (#1993) 2023-04-17 13:10:02 +01:00
Rushaway
a330d0a1bf
Add missing french translations (#1985) 2023-04-15 18:18:44 +01:00
peace-maker
4e6774befb
Add sanity check for syntax errors in translations (#1978)
The pull request should be blocked on basic typos breaking the SMC file.
2023-04-09 19:25:50 +02:00
crashzk
b1b993989a
Update Brazilian Phrases (#1974)
* update: Translations rockthevote.phrases.txt

* update: Translations nominations.phrases.txt

* update: Translations basetriggers.phrases.txt

* update: Small changes in translations

* fix: Small corrections in the translation

* update: lower case

* fix: Minors

* fix: Translations Slot Reserved & Fun Votes

* Update funvotes.phrases.txt
2023-04-09 15:13:59 +00:00
Mikhail Buchka
2e59202ea4
Added missing phrases and parameter (#1977) 2023-04-09 15:13:46 +00:00
aept
4a6d29c9e2
Add missing latam phrases (#1968)
* Add missing latam phrases

* Fix latam phrases

Fixed some latam phrases to fit Latam dialect, previously were Spanish from Spain.
2023-04-09 15:09:43 +00:00
rcon_password
e746fdf1fb
missing translation added (#1982) 2023-04-09 14:55:25 +00:00
rcon_password
cac7793f15
translations updated (#1981)
I removed the word Aptauja since in this context it isn't the right word to use https://tezaurs.lv/aptauja:1 and changed it to this word https://tezaurs.lv/balso%C5%A1ana:1 

Example: I was asked  by a stranger on the street to participate in the "Aptaujā" 
Example 2: I went to the biggest shopping mall in Latvia to participate in the "Balsošānā", the year's best actor.
2023-04-09 14:55:16 +00:00
rcon_password
e0c95674c8
missing translation added + fix (#1979)
Added missing translation + Can't Nominate Current Map translation was changed because The sentence in Latvian doesn't sound good + the chosen word wasn't the best option in this sentence.
2023-04-09 14:55:06 +00:00
rcon_password
bc42cef765
missing translation (#1980) 2023-04-09 14:54:54 +00:00
Nicholas Hastings
680a198fa2
Fix quotes in UA translation. 2023-04-07 21:30:20 +00:00
peace-maker
38f7be7664
Update Ukrainian phrases (#1970)
Thank you to VAC#1643 on Discord!
2023-04-07 23:18:16 +02:00
peace-maker
94f5b5d06c
Add missing german phrases (#1966) 2023-04-07 06:59:48 +02:00
XeroX
f66a904c31
Update SDKCall documentation for string return type (#1961)
* Update SDKCall return information

This adds the information that if the return value is a string then SDKCall will return the number of bytes written.

* Update description

* Add info if the string is null
2023-04-02 23:46:53 +02:00
Forgetest
8e0039aaec
[DHooks] Fix NaN return when superceding pre-detour (#1967)
* Update hook.cpp

* Update hook.cpp
2023-03-31 18:19:04 +02:00
Kyle Sanderson
dd1e5997f3
spanish fixups (#1965)
* Update basetriggers.phrases.txt

* Update rockthevote.phrases.txt

* Update nominations.phrases.txt
2023-03-30 14:05:55 +02:00
Corey D
bc6e920213
Improve HasEntProp performance (#1908) 2023-03-29 21:40:30 -07:00
Michael
a28c3cac9b
cstrike.csgo: Add native to retrieve loadout slot of weapon (#1241)
* Add native to retrieve loadout slot of weapon

* Mention the native is for CS:GO only

---------

Co-authored-by: Peace-Maker <peace-maker@wcfan.de>
2023-03-29 21:27:45 -07:00
fakuivan
6670b93cc6
keyvalues: adjust KvSavePosition return value to implementation (#757)
The current ``KvSavePosition`` definition does not reflect the behaviour seen in [core/smn_keyvalues.cpp#L973-L981](404e96ad45/core/smn_keyvalues.cpp (L973-L981)). This can cause problems if some procedure on sp expects ``KvSavePosition`` to always add one node to the stack, no matter if there is no higher node.

Co-authored-by: peace-maker <peace-maker@wcfan.de>
2023-03-29 21:06:36 -07:00
aept
8826663186
translations: add missing phrases to Spanish language (#1964)
* Added corresponding format parameters

* Added missing phrase

* Added missing phrase to basetriggers
2023-03-29 20:43:03 -07:00
Corey D
c5087d7a39
database: flip to recursive_mutex to allow nested locks (#1937)
* Fix crash from db locking

* Change db lock to use recursive_mutex
2023-03-29 20:03:03 -07:00
FlaminSarge
5ba9816377
nominations: implement map not in pool phrase (#597)
New English text is “Map ‘%s’ is not in the nominations pool.”
2023-03-29 18:39:54 -07:00
peace-maker
4eecc80b9a
Fix translations workflow (#1963)
* Fix translations workflow

* Temporarily trigger workflow for PRs

* Trigger without a PR

* Just work please

* Update github-app-token dependency

* Update workflow step name

* Disable on PRs again
2023-03-30 02:28:03 +02:00
peace-maker
008fbf78a5
Cleanup the translation files (#1962)
* Remove obsolete slapslay.phrases.txt

That plugin isn't in the stock arsenal since forever.

* Remove "Dead Player Rename" phrase

Unused since #313

* Remove nominations phrases from rockthevote

Those phrases were moved to their own nominations.phrases.txt

* Remove "Next Map" phrase from nextmap.phrases.txt

It was moved to basetriggers.phrases.txt

* Remove unused phrases from common.phrases.txt

Only "Slapped Player" was moved to funvotes.phrases.txt

* Delete empty phrase files

* Fix workflow python version selection

3.10 would select Python 3.1 and fail

* Deduplicate "Please select a map" phrase

Only keep it in the plugin.basecommands.txt file and remove it from the basevotes.phrases.txt.

Both plugins using the phrase load the basecommands phrases.

* Allow manual triggering of translations action

* Actually use the nextmap phrases

They were never referenced in the plugin. The "ago" phrase doesn't work the way it is and needs more rethinking.
2023-03-30 01:13:40 +02:00
Kyle Sanderson
48150e0c7a
Bring languages into the tree (#1625)
* translations: bring languages into tree

* Update translation phrases changed since 2021

* Update packaging script to include all translations

* Update languages.cfg

* Add Latin American Spanish translations

This is a copy of spanish for now.

* Ignore "en" when looking for translation folders

English is the default and doesn't use a subfolder.

* Only add each translation folder once

Korean "ko" is in there twice.

* Compare language coverage to english

All phrases are compared to the english baseline files and any differences
are reported. The differences are pushed to a Github Project as well for
an easier overview.

Thank you to @nosoop for sharing the Python SMC parser!

* Add link to README

---------

Co-authored-by: Peace-Maker <peace-maker@wcfan.de>
2023-03-29 16:23:05 +02:00
peace-maker
d8fd60b562
Update clang-8 CI run to Ubuntu 20.04 (#1960)
The Ubuntu 18.04 runner image is deprecated and will be unsupported on 2023/04/01. It appears Ubuntu 20.04 has a package for clang-8, so just do the switch.
2023-03-28 13:50:19 +02:00
sappho
178658912e
fix mismatched delete [] in regex extension (#1941)
* fix mismatched delete []

* strdup needs to be free'd, not deleted
2023-03-27 15:50:31 +02:00
Mikusch
5539484f92
Add support for float modulo operator (#1953) 2023-03-19 16:19:42 +00:00
data-bomb
a9a1939f75
Add LookupAttachment signature for ND (#1942)
Adds the LookupAttachment signature for Nuclear Dawn
2023-03-04 05:05:55 +00:00
Alienmario
850f96b986
Allow void return type in timer callbacks (#1916) 2023-03-02 21:28:42 -08:00
Dysphie
693e584dcd
Fix LookupAttachment signature for NMRiH (#1940) 2023-03-01 16:31:56 +00:00
Nick Hastings
397b70add0 Enable ShowMenu support for Reactive Drop (see #1938)
Note: Currently only works on beta version of game
2023-02-26 12:39:22 -05:00
Corey D
a0eb6a9550
Fix LookupAttachment signature (#1933) 2023-02-13 02:02:48 +00:00
Nicholas Hastings
6bd49ff415
Protect against server crash when DHooks cannot load from SDKHooks not being loaded. (#1930) 2023-02-09 00:10:14 +00:00
Corey D
43cdc65708
Add Ghidra MakeSig script (#1926) 2023-02-05 04:46:52 +00:00
Nicholas Hastings
cd6886319c
Fix crash with IgniteEntity on MCV (#1924)
* Fix crash with IgniteEntity on MCV.

* Formatting.
2023-02-04 16:09:46 +00:00
Poggu
6e839a95c6
Fix EntityFactoryCaller signature (#1925) 2023-02-04 16:06:38 +00:00
El Diablo
2dcee81f22
Linux [SDKTOOLS] Sigscan for FireOutput FIX (#1923)
Addie said:
test the signatures:
\x55\x89\xE5\x57\x56\x53\x81\xEC\x8C\x01\x00\x00\x8B\x55\x08
or
digby's \x55\x89\xE5\x57\x56\x53\x81\xEC\x8C\x01\x00\x00\x8B\x55\x2A\x65\xA1

\x55\x89\xE5\x57\x56\x53\x81\xEC\x8C\x01\x00\x00\x8B\x55\x08 fixed the issue for linux server.
2023-02-04 14:46:57 +00:00
GAMMACASE
a253d35bcd
Gamedata update after 2/2/2023 CSGO update (#1921) 2023-02-03 17:38:37 +00:00
Poggu
02e9d214b4
Update Military Conflict: Vietnam gamedata (#1915)
Revert whitespace removal


Revert ignite offset
2023-01-30 23:04:53 +00:00
Nicholas Hastings
30a2160839
Fix gamedata library search order in some cases. (#1914) 2023-01-29 20:24:34 +00:00
rtldg
d57d7e7401
Enable math functions in sqlite (#1886) 2023-01-29 17:30:15 +00:00
Impact
1f5b735dbd
Add note about automatic unhook (#1910) 2023-01-22 10:23:40 +01:00
Nick Hastings
d5a26adc49 Regression fix for CS:GO GivePlayerItem.
Regressed in https://github.com/alliedmodders/sourcemod/pull/1887
2023-01-20 10:09:22 -05:00
Rushaway
221d34f809
fix: Print full map name in Log instead of args (#1907) 2023-01-15 13:32:41 -05:00