Skip to content

feat(core): Release 2.1.0#24

Merged
Rushaway merged 4 commits into
srcdslab:masterfrom
Rushaway:2.1.0
Jun 25, 2026
Merged

feat(core): Release 2.1.0#24
Rushaway merged 4 commits into
srcdslab:masterfrom
Rushaway:2.1.0

Conversation

@Rushaway

@Rushaway Rushaway commented Jun 25, 2026

Copy link
Copy Markdown
Member
  • Fixed forced name not changing after renaming / when connecting
  • Fixed forced names list menu not opening when it was empty
  • Minor optimization
  • Added ire. name since he made the original forced name plugin
  • Rework translations
  • Minor refactoring
  • Add GetClientForcedName, GetForcedNameByAuthId, GetSteam2Variant
  • Adjusted buffer size

Rushaway added 3 commits June 25, 2026 09:02
- Fixed forced name not changing after renaming / when connecting
- Fixed forced names list menu not opening when it was empty
- Minor optimization + translations addition
- Added ire. name since he made the original forced name plugin
- Minor refactoring
- Add `GetClientForcedName`, `GetForcedNameByAuthId`, `GetSteam2Variant`
Copilot AI review requested due to automatic review settings June 25, 2026 08:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR prepares the NameFilter SourceMod plugin for the 2.1.0 release, focusing on improving forced-name enforcement reliability, menu behavior, and translation/UX messaging.

Changes:

  • Strengthens forced-name enforcement across connect/put-in-server/rename flows and adds helper APIs (GetClientForcedName, GetForcedNameByAuthId, GetSteam2Variant) plus variant caching.
  • Fixes the forced-names menu behavior when no entries exist (and refactors the menu-building logic).
  • Reworks translations and adds a player-facing chat info phrase for forced-name changes; updates plugin metadata (version/author).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
addons/sourcemod/scripting/NameFilter.sp Refactors forced-name lookups/caching and applies forced names more consistently; updates forced-names menu behavior; bumps plugin version/author.
addons/sourcemod/translations/namefilter.phrases.txt Updates and adds translated phrases (including a new forced-name chat info message) and refreshes menu/command wording.
Comments suppressed due to low confidence (2)

addons/sourcemod/scripting/NameFilter.sp:270

  • When the config has no subkeys, you add the "MenuEmpty" item here, but bEmpty remains true, so the later if (bEmpty) block adds the same disabled item a second time. This results in a duplicated "empty" row in the menu.
	SetUpKeyValues();
	if (!g_Kv.GotoFirstSubKey())
	{
		Format(MenuBuffer2, sizeof(MenuBuffer2), "%T", "MenuEmpty", client);
		MainMenu.AddItem("", MenuBuffer2, ITEMDRAW_DISABLED);

addons/sourcemod/scripting/NameFilter.sp:126

  • CheckClientName unconditionally schedules a forced-name change (and chat notice) if a forced name exists. If the forced name was already applied earlier (e.g., in OnClientPutInServer), this will re-apply the same name and can result in duplicate "ForcedName_ChatInfo" messages. Consider checking the current name first and only applying when it differs.
	if (client && GetClientForcedName(client, g_sForcedName, sizeof(g_sForcedName)))
	{
		DataPack pack = new DataPack();
		pack.WriteCell(client);
		pack.WriteString(g_sForcedName);

Comment thread addons/sourcemod/scripting/NameFilter.sp
Comment thread addons/sourcemod/scripting/NameFilter.sp Outdated
Comment thread addons/sourcemod/scripting/NameFilter.sp
@Rushaway Rushaway merged commit e5d3a61 into srcdslab:master Jun 25, 2026
3 checks passed
@Rushaway Rushaway deleted the 2.1.0 branch June 25, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants