-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Massive refactors, improvements, automatic packaging
* Completely refactored antilag's admin backend * Added includes & common utilities * No-op now has a status command * Split CIs into different workflows * It is now impossible for Antilag to false ban * Un-bumped plugins down to SM 1.11
- Loading branch information
Showing
15 changed files
with
2,689 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Plugins | ||
on: | ||
pull_request: | ||
push: | ||
repository_dispatch: | ||
|
||
jobs: | ||
plugins: | ||
runs-on: ubuntu-latest | ||
name: Build Plugins | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Build Plugins | ||
shell: pwsh | ||
run: cd src && ./build.ps1 | ||
- name: Upload Plugins | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
if-no-files-found: error | ||
name: plugins | ||
path: | | ||
src/plugins | ||
!src/plugins/.gitkeep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
# Test outputs | ||
/test/bin/*.dll | ||
/test/bin/*.so | ||
|
||
# Test logs | ||
test/output.temp | ||
test/exporter.temp | ||
/src/plugins/*.smx | ||
/src/scripting/private/ | ||
test/output.temp | ||
test/cache | ||
test/logs | ||
test/logs | ||
|
||
# Plugin things | ||
/src/plugins/*.smx | ||
/src/scripting/private/ | ||
|
||
# Package things | ||
package/ | ||
sourceforks.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
|
||
Write-Host ":::: ==========================" | ||
Write-Host ":::: TESTING GAMEDATA FOR CS:GO" | ||
Write-Host ":::: ==========================" | ||
|
||
$base = Get-Location | ||
|
||
Set-Location test | ||
& ./test.ps1 -SUPPRESS_BUILD:$True | ||
|
||
Write-Host ":::: ===========================" | ||
Write-Host ":::: BUILDING INDIVIDUAL PLUGINS" | ||
Write-Host ":::: ===========================" | ||
|
||
Set-Location $base | ||
Set-Location src | ||
& ./build.ps1 | ||
|
||
Write-Host ":::: ============================" | ||
Write-Host ":::: PACKAGING SOURCEFORKS ASSETS" | ||
Write-Host ":::: ============================" | ||
|
||
Set-Location $base | ||
|
||
if (Test-Path -PathType Container package) | ||
{ | ||
Write-Host "* Clearing old package" | ||
Remove-Item -Path package -Recurse | ||
} | ||
|
||
Write-Host "* Creating package directory" | ||
New-Item -Path package -Type Directory | ||
|
||
Write-Host "* Creating directories" | ||
New-Item -Path package/addons -Type Directory | ||
New-Item -Path package/addons/sourcemod -Type Directory | ||
|
||
Copy-Item -Recurse -Path gamedata -Destination package/addons/sourcemod | ||
Remove-Item -Path package/addons/sourcemod/gamedata/partial -Recurse | ||
# ^ Remove partial gamedatas | ||
|
||
Copy-Item -Recurse -Path src/plugins -Destination package/addons/sourcemod | ||
Copy-Item -Recurse -Path src/cfg -Destination package/ | ||
|
||
Write-Host ":::: ==========================" | ||
Write-Host ":::: COMPRESSING PACKAGE TO ZIP" | ||
Write-Host ":::: ==========================" | ||
|
||
Compress-Archive -Force -Path package/* -DestinationPath sourceforks.zip | ||
Write-Host "* Done!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// This file was auto-generated by SourceMod (v1.12.0.6968) | ||
// ConVars for plugin "sourceforks_antilag.smx" | ||
|
||
|
||
// 0 = None, 1 = Alert Admins, 2 = Kick, 3 = Permanent Ban (Default) | ||
// - | ||
// Default: "3" | ||
sourceforks_antilag_punishment "3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// Utilities to assist with printing messages to admins | ||
|
||
#include <multicolors> | ||
#include <sourcemod> | ||
|
||
#define BUFFER_SIZE 512 | ||
|
||
stock void PrintToAdmins(const char[] format, AdminFlag flags, ...) | ||
{ | ||
char buffer[BUFFER_SIZE]; | ||
VFormat(buffer, sizeof(buffer), format, 3); | ||
|
||
PrintToServer("[SourceForks Server]: %s", buffer); | ||
|
||
for (int admin = 1; admin < MAXPLAYERS; admin++) | ||
{ | ||
if (!CheckCommandAccess(admin, "", int:flags, true)) | ||
continue; | ||
|
||
PrintToChat(admin, "[SourceForks]: %s", buffer); | ||
} | ||
} | ||
|
||
stock void CPrintToAdmins(const char[] in_format, AdminFlag flags, ...) | ||
{ | ||
char buffer[BUFFER_SIZE]; | ||
char format[BUFFER_SIZE]; | ||
|
||
strcopy(format, sizeof(format), in_format); | ||
// Consume buffer early to print to server | ||
{ | ||
CRemoveTags(format, sizeof(format)); | ||
VFormat(buffer, sizeof(buffer), format, 3); | ||
PrintToServer("[SourceForks Server]: %s", buffer); | ||
} | ||
strcopy(format, sizeof(format), in_format); | ||
|
||
// Now do color formatting | ||
{ | ||
CFormatColor(format, sizeof(format), -1); | ||
VFormat(buffer, sizeof(buffer), format, 3); | ||
} | ||
for (int admin = 1; admin < MAXPLAYERS; admin++) | ||
{ | ||
if (!CheckCommandAccess(admin, "", int:flags, true)) | ||
continue; | ||
|
||
PrintToChat(admin, "[SourceForks]: %s", buffer); | ||
} | ||
} |
Oops, something went wrong.