sourcemod/plugins
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
..
admin-flatfile Update small plugins for transitional syntax (#506) 2016-05-11 09:32:34 -04:00
adminmenu Add missing return values in plugins 2021-08-21 14:11:20 -07:00
basebans Fix invalid client index in Basebans menu 2023-05-11 23:56:40 +03:00
basecomm Add missing return values in plugins 2021-08-21 14:11:20 -07:00
basecommands fix: Print full map name in Log instead of args (#1907) 2023-01-15 13:32:41 -05:00
basevotes Prevent enum shadowing & pin sourcemod for build fixes (#1661) 2021-12-10 14:22:04 -08:00
funcommands Add GetCmdArgFloat(Ex) stocks (#1742) 2022-04-12 11:17:05 +01:00
funvotes Add missing return values in plugins 2021-08-21 14:11:20 -07:00
include Increase Cookie.GetInt/SetInt buffer size (#1995) 2023-04-22 01:19:36 -07:00
playercommands Add missing return values in plugins 2021-08-21 14:11:20 -07:00
testsuite Add functions for working with entity lumps (#1673) 2022-09-05 15:44:58 -07:00
admin-sql-prefetch.sp Update small plugins for transitional syntax (#506) 2016-05-11 09:32:34 -04:00
admin-sql-threaded.sp Add support for other Steam ID formats to admin-sql-threaded (#1520). 2021-10-24 09:57:03 -04:00
adminhelp.sp Add CommandIterator.ConVarFlags property (#1869) 2022-12-04 12:24:56 +01:00
adminmenu.sp Create GlobalForward & PrivateForward methodmaps (#1004) 2019-05-29 14:17:42 -07:00
AMBuilder Remove use of the Dep API. 2020-08-24 20:48:57 -07:00
antiflood.sp Introduce enum structs to core sm plugins 2018-12-15 13:51:03 -08:00
basebans.sp Fix invalid client index in Basebans menu 2023-05-11 23:56:40 +03:00
basechat.sp Add "sm_dsay" command to basechat for sending HUD messages (#1889) 2022-12-20 00:00:43 +00:00
basecomm.sp Fix basecomm failing to load on games without sv_alltalk (#1212) 2020-03-11 21:24:16 -07:00
basecommands.sp Prevent basecommands from printing to disconnected clients (#1138) 2020-02-06 22:32:16 -08:00
basetriggers.sp Friendly Fire support L4D(2) games. (#1530) 2022-12-29 14:00:58 +00:00
basevotes.sp Add logging to all basevote vote results (#1794) 2022-10-30 23:26:17 +01:00
clientprefs.sp cookies: Align output with sm_help (#977) 2020-07-08 20:38:35 -07:00
compile.sh Add spacing to compile.sh (#53) 2016-10-24 14:50:24 +01:00
funcommands.sp Add missing return values in plugins 2021-08-21 14:11:20 -07:00
funvotes.sp Allow h-flag admins to bypass vote delay (#1733) 2022-04-12 11:19:54 +01:00
mapchooser.sp Update to the new SourcePawn compiler. 2021-10-26 17:45:48 -10:00
nextmap.sp Cleanup the translation files (#1962) 2023-03-30 01:13:40 +02:00
nominations.sp nominations: implement map not in pool phrase (#597) 2023-03-29 18:39:54 -07:00
playercommands.sp Update small plugins for transitional syntax (#506) 2016-05-11 09:32:34 -04:00
randomcycle.sp Prevent duplicate map changes in randomcycle.sp (#1428) 2021-03-14 01:02:42 -08:00
reservedslots.sp Get sdktools and sdkhooks/dhooks to load on hl2sdk-mock (#1892) 2022-12-22 18:39:12 +01:00
rockthevote.sp Add missing return values in plugins 2021-08-21 14:11:20 -07:00
sounds.sp Show errors for methods that are unused. (bug 6183) 2014-07-12 10:28:29 -07:00
sql-admin-manager.sp Add PostgreSQL database driver (#32) 2021-03-11 11:21:51 +01:00