Skip to content

Commit ca5efbd

Browse files
committed
docs(plugin): frame MAJOR 2 as epoch sync, not blanket recompile (#1114)
Adversarial review: MAJOR_REVISION aligns with panel 2.0; existing third-party .smx using prior SBPP APIs generally keep working. Narrow rebuild guidance to checker library detection, new checker natives, and optional post-admin forward adoption.
1 parent e0d700b commit ca5efbd

3 files changed

Lines changed: 59 additions & 46 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,15 @@ Legend:
101101
`AGENTS.md` (workflow / conventions) live alongside
102102
`README.md`; user-facing install / upgrade / configure
103103
guides moved to the Starlight site at sbpp.github.io
104-
36. ? SourceMod native API `MAJOR_REVISION` bumped to 2 in
105-
`sourcebanspp.inc` (`MINOR_REVISION` reset to 0; plugin
106-
release string `SB_VERSION` → 2.0.0). Third-party plugins
107-
must recompile against this header. See also checker comms
108-
natives ([#1032](https://github.com/sbpp/sourcebans-pp/pull/1032)),
109-
checker library rename
110-
([#1034](https://github.com/sbpp/sourcebans-pp/pull/1034)),
111-
and post-admin forward
112-
([#1431](https://github.com/sbpp/sourcebans-pp/pull/1431)).
113-
([#1114](https://github.com/sbpp/sourcebans-pp/issues/1114))
104+
36. • SourceMod native API epoch: `MAJOR_REVISION` 2 / `MINOR_REVISION` 0 in
105+
`sourcebanspp.inc`; plugin `SB_VERSION` → 2.0.0 (panel 2.0 alignment).
106+
New `SOURCEBANSPP_VERSION_MAJOR` for optional compile-time guards.
107+
Third-party plugins need a rebuild only when they use checker library
108+
detection (`"sourcechecker++"`, not `"sourcebans++"` — #1034), new
109+
checker mute/gag natives (#1032), or hook
110+
`SBPP_OnClientPostAdminCheck` (#1431). Plugins that only call
111+
existing SBPP ban/report forwards/natives can usually keep their
112+
existing `.smx`. ([#1114](https://github.com/sbpp/sourcebans-pp/issues/1114))
114113
```
115114

116115
### Privacy

docs/src/content/docs/updating/1-8-to-2-0.mdx

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -252,37 +252,42 @@ hard-fail a panel page.
252252

253253
## Plugin authors
254254

255-
If your server runs a **third-party SourceMod plugin** that
256-
`#include <sourcebanspp>` and calls SBPP natives or forwards, plan
257-
to **recompile** it against the `sourcebanspp.inc` shipped with
258-
SourceBans++ 2.0.0 before you deploy the new `.smx` files.
259-
260-
The public header now exposes `SOURCEBANSPP_VERSION_MAJOR` (2 for
261-
this release). Guard your plugin at compile time:
255+
SourceBans++ 2.0.0 aligns the public header with the 2.0 release
256+
(`SOURCEBANSPP_VERSION_MAJOR` = 2, plugin `SB_VERSION` 2.0.0). That is a
257+
**version epoch marker**, not a signal that every third-party plugin must
258+
be recompiled.
259+
260+
**You do not need to rebuild** if your plugin only uses APIs that already
261+
existed on the 1.x line (for example `SBPP_BanPlayer`, `SBPP_OnBanPlayer`,
262+
`SBPP_OnReportPlayer`) and you are not detecting the checker via
263+
`LibraryExists` / `GetFeatureStatus`.
264+
265+
**Recompile (and redeploy your `.smx`) when you:**
266+
267+
- `#include <sourcebanschecker>` and probe the checker with
268+
`LibraryExists` / `GetFeatureStatus` — use library name
269+
`"sourcechecker++"`, not `"sourcebans++"`
270+
([#1034](https://github.com/sbpp/sourcebans-pp/pull/1034)).
271+
- Call `SBPP_CheckerGetClientsMutes` or `SBPP_CheckerGetClientsGags`
272+
([#1032](https://github.com/sbpp/sourcebans-pp/pull/1032)) — deploy
273+
`sbpp_checker.smx` from this release too.
274+
- Want to implement `SBPP_OnClientPostAdminCheck`
275+
([#1431](https://github.com/sbpp/sourcebans-pp/pull/1431)) — additive
276+
forward; existing binaries ignore it until you add a hook.
277+
278+
Optional guard when you compile against 2.0 `sourcebanspp.inc`:
262279

263280
```sourcepawn
264281
#if SOURCEBANSPP_VERSION_MAJOR != 2
265-
#error Recompile this plugin against SourceBans++ 2.0 sourcebanspp.inc
282+
#error Rebuild against SourceBans++ 2.0 sourcebanspp.inc
266283
#endif
267284
```
268285

269-
Changes since the 1.x native API that affect third-party code:
270-
271-
- **`sourcebanspp.inc`** (library `"sourcebans++"`): new forward
272-
`SBPP_OnClientPostAdminCheck` ([#1431](https://github.com/sbpp/sourcebans-pp/pull/1431)).
273-
- **`sourcebanschecker.inc`** (library `"sourcechecker++"` — renamed
274-
from `"sourcebans++"` in
275-
[#1034](https://github.com/sbpp/sourcebans-pp/pull/1034)): new
276-
natives `SBPP_CheckerGetClientsMutes` and `SBPP_CheckerGetClientsGags`
277-
([#1032](https://github.com/sbpp/sourcebans-pp/pull/1032)).
278-
279-
Ship the rebuilt `.smx` with the 2.0 plugin bundle
280-
(`sbpp_main.smx`, `sbpp_comms.smx`, `sbpp_checker.smx`, …). SourceMod
281-
**1.12.x** is the compiler floor the project CI uses (match your
282-
release build to the same toolchain).
286+
Deploy the official 2.0 plugin bundle (`sbpp_main.smx`, `sbpp_comms.smx`,
287+
`sbpp_checker.smx`, …) with the panel upgrade. SourceMod **1.12.x** matches
288+
project CI.
283289

284-
Native API bump tracking:
285-
[#1114](https://github.com/sbpp/sourcebans-pp/issues/1114).
290+
Tracking: [#1114](https://github.com/sbpp/sourcebans-pp/issues/1114).
286291

287292
## Licence change
288293

game/addons/sourcemod/scripting/include/sourcebanspp.inc

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,33 @@
3030
#define _sourcebanspp_included
3131

3232
// -------------------------------------------------------------------------
33-
// Native API revision (bump MAJOR when third-party plugins must recompile)
33+
// Native API revision (aligned with SourceBans++ 2.0 panel / plugin release)
3434
// -------------------------------------------------------------------------
3535
//
36-
// 2.0 native surface (this release):
37-
// sourcebanspp.inc / library "sourcebans++"
38-
// - Added forward SBPP_OnClientPostAdminCheck (#1431).
39-
// - SBBanPlayer remains deprecated; use SBPP_BanPlayer.
36+
// MAJOR_REVISION tracks the documented native API epoch (2 = 2.0 line).
37+
// Bump MAJOR only when a change requires third-party plugins to recompile
38+
// (removed/changed native signatures, removed forwards). Bump MINOR for
39+
// additive natives/forwards that old .smx files can ignore at runtime.
4040
//
41-
// sourcebanschecker.inc / library "sourcechecker++" (separate #include)
42-
// - RegPluginLibrary name changed from "sourcebans++" to
43-
// "sourcechecker++" (#1034) — update GetFeatureStatus / library checks.
44-
// - Added natives SBPP_CheckerGetClientsMutes,
45-
// SBPP_CheckerGetClientsGags (#1032).
41+
// 2.0 epoch (this header):
42+
// sourcebanspp.inc — library "sourcebans++" (sbpp_main.smx)
43+
// Additive: forward SBPP_OnClientPostAdminCheck (#1431).
44+
// Unchanged: SBPP_BanPlayer; SBBanPlayer remains deprecated.
45+
// Existing third-party .smx that only use prior natives/forwards
46+
// generally keep working without a rebuild.
4647
//
47-
// Third-party plugins should compile against this header and guard at the top:
48+
// sourcebanschecker.inc — RegPluginLibrary "sourcechecker++" (#1034)
49+
// Recompile / update detection if you #include checker and use
50+
// LibraryExists/GetFeatureStatus: was "sourcebans++", now
51+
// "sourcechecker++". Additive natives: SBPP_CheckerGetClientsMutes,
52+
// SBPP_CheckerGetClientsGags (#1032); require sbpp_checker.smx that
53+
// implements them if you call those natives.
54+
//
55+
// Optional compile-time guard (add to your plugin if you ship against
56+
// this header and want a hard fail when the epoch drifts):
4857
//
4958
// #if SOURCEBANSPP_VERSION_MAJOR != 2
50-
// #error Recompile this plugin against SourceBans++ 2.0 sourcebanspp.inc
59+
// #error Rebuild against SourceBans++ 2.0 sourcebanspp.inc
5160
// #endif
5261
//
5362
// -------------------------------------------------------------------------

0 commit comments

Comments
 (0)