Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update public repo to the latest (stable) beta repo #474

Merged
merged 1 commit into from Jul 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitattributes
@@ -0,0 +1,3 @@
# SourcePawn linguist file
*.sp linguist-language=SourcePawn
*.inc linguist-language=SourcePawn
10 changes: 8 additions & 2 deletions .github/ISSUE_TEMPLATE/Bug_Report.md
Expand Up @@ -13,12 +13,12 @@ Please provide us some details and specifications of the server you've encounter
- **SourceMod Version (sm version):** your version here
- **TTT Version (sm_tttversion):** your version here

If you're also running any extensions, please list them below:
If you're also running any extensions, please list (**sm exts list**) them below:
```
Your extensions here.
```

If you're also running any other plugins, please list them below:
If you're also running any other plugins, please list (**sm plugins list**) them below:
```
Your plugins here.
```
Expand All @@ -29,6 +29,12 @@ Please provide us with the SourceMod logs located under `addons/sourcemod/logs/e
Your logs here.
```

## On Server Crash
Please provide us the latest accelerator crash id/url located under `addons/sourcemod/logs/accelerator.log`.
```
Your crash id/url
```

## Steps to Reproduce:
Please please us a detailed set of steps that can be used to reproduce this bug in a controlled environment. This will help us narrow down the source of the issue much faster.
```
Expand Down
13 changes: 13 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/Bug_Fix.md
@@ -0,0 +1,13 @@
---
name: Bug Fix
about: Use this template, if you fix a bug (or more)

---
## Description
Describe your bug and why it should be fixed (in not all cases it's a bug).

## Steps to Reproduce:
Please please us a detailed set of steps that can be used to reproduce this bug in a controlled environment. This will help us narrow down the source of the issue much faster.
```
Your steps here.
```
10 changes: 10 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/New_Feature.md
@@ -0,0 +1,10 @@
---
name: New Feature
about: Use this template, if you provide a new feature.

---
## Description
Describe your feature and why we should add it.

## Changelogs
Add your feature to the latest changelogs file, can be found in the changelogs folder.
44 changes: 28 additions & 16 deletions .github/workflows/master.yml
Expand Up @@ -70,7 +70,7 @@ jobs:
- name: Disable optional plugins
run: |
mv $SCRIPTS_PATH/README.md $PLUGINS_PATH/disabled
mv $PLUGINS_PATH/ttt/ttt_{discord,dronescameras,futuristicgrenades,parachute,tactical_shield}.smx $PLUGINS_PATH/disabled
mv $PLUGINS_PATH/ttt/ttt_{discord,dronescameras,futuristicgrenades,glow_light,parachute,tactical_shield}.smx $PLUGINS_PATH/disabled

- name: Move folders (addons, materials, models, particles, sound) to build
run: |
Expand All @@ -87,40 +87,52 @@ jobs:
rm -rf addons/sourcemod/scripting
rm -rf addons/sourcemod/configs/{*.cfg,*.ini}
working-directory: ./build

- name: Rename build to build-linux and copy for build-windows
run: |
mv build build-linux
cp -r build-linux build-windows

- name: Download SteamWorks and DHooks
- name: Download DHooks, SMJansson and SteamWorks
run: |
wget http://users.alliedmods.net/~kyles/builds/SteamWorks/SteamWorks-git131-linux.tar.gz -O steamworks_linux.tar.gz
wget http://users.alliedmods.net/~kyles/builds/SteamWorks/SteamWorks-git131-windows.zip -O steamworks_windows.zip
curl -s "https://forums.alliedmods.net/attachment.php?attachmentid=181953&d=1591738802" -o dhooks.zip
curl -s "https://forums.alliedmods.net/attachment.php?attachmentid=133799&d=1400973546" -o smjansson.zip

- name: Unpacking SteamWorks and DHooks
- name: Unpacking DHooks, SMJansson and SteamWorks
run: |
tar xfv steamworks_linux.tar.gz
unzip -o steamworks_windows.zip
unzip dhooks.zip
unzip smjansson.zip

- name: Move SteamWorks and DHooks files
- name: Move DHooks, SMJansson and SteamWorks files
run: |
mkdir -p build/addons/sourcemod/extensions/
cp addons/sourcemod/extensions/SteamWorks.ext.so build/addons/sourcemod/extensions/
cp addons/sourcemod/extensions/SteamWorks.ext.dll build/addons/sourcemod/extensions/
cp addons/sourcemod/extensions/dhooks.ext.so build/addons/sourcemod/extensions/
cp addons/sourcemod/extensions/dhooks.ext.dll build/addons/sourcemod/extensions/
mkdir -p build-{windows,linux}/addons/sourcemod/extensions/
cp addons/sourcemod/extensions/SteamWorks.ext.so build-linux/addons/sourcemod/extensions/
cp addons/sourcemod/extensions/SteamWorks.ext.dll build-windows/addons/sourcemod/extensions/
cp addons/sourcemod/extensions/dhooks.ext.so build-linux/addons/sourcemod/extensions/
cp addons/sourcemod/extensions/dhooks.ext.dll build-windows/addons/sourcemod/extensions/
cp smjansson.ext.so build-linux/addons/sourcemod/extensions/
cp smjansson.ext.dll build-windows/addons/sourcemod/extensions/

- name: Compress package
run: zip -9rq TTT.${{ env.PLUGIN_VERSION }}.zip addons materials models particles sound CREDITS.md LICENSE CVARS.txt adminmenu_custom.txt
working-directory: ./build
run: |
zip -9rq TTT.Linux.${{ env.PLUGIN_VERSION }}.zip build-linux/*
zip -9rq TTT.Windows.${{ env.PLUGIN_VERSION }}.zip build-windows/*

- name: Upload package
run: curl -T TTT.${{ env.PLUGIN_VERSION }}.zip -u ${{ secrets.FTP_NAME }}:${{ secrets.FTP_PASS }} ftp://${{ secrets.FTP_HOST }}:${{ secrets.FTP_PORT }}/downloads/
working-directory: ./build
run: |
curl -T TTT.Linux.${{ env.PLUGIN_VERSION }}.zip -u ${{ secrets.FTP_NAME }}:${{ secrets.FTP_PASS }} ftp://${{ secrets.FTP_HOST }}:${{ secrets.FTP_PORT }}/downloads/
curl -T TTT.Windows.${{ env.PLUGIN_VERSION }}.zip -u ${{ secrets.FTP_NAME }}:${{ secrets.FTP_PASS }} ftp://${{ secrets.FTP_HOST }}:${{ secrets.FTP_PORT }}/downloads/

- name: Upload latest package
run: |
mv TTT.${{ env.PLUGIN_VERSION }}.zip TTT.latest.${{ matrix.SM_VERSION }}.zip
curl -T TTT.latest.${{ matrix.SM_VERSION }}.zip -u ${{ secrets.FTP_NAME }}:${{ secrets.FTP_PASS }} ftp://${{ secrets.FTP_HOST }}:${{ secrets.FTP_PORT }}/downloads/
working-directory: ./build
mv TTT.Linux.${{ env.PLUGIN_VERSION }}.zip TTT.Linux.latest.${{ matrix.SM_VERSION }}.zip
mv TTT.Windows.${{ env.PLUGIN_VERSION }}.zip TTT.Windows.latest.${{ matrix.SM_VERSION }}.zip
curl -T TTT.Linux.latest.${{ matrix.SM_VERSION }}.zip -u ${{ secrets.FTP_NAME }}:${{ secrets.FTP_PASS }} ftp://${{ secrets.FTP_HOST }}:${{ secrets.FTP_PORT }}/downloads/
curl -T TTT.Windows.latest.${{ matrix.SM_VERSION }}.zip -u ${{ secrets.FTP_NAME }}:${{ secrets.FTP_PASS }} ftp://${{ secrets.FTP_HOST }}:${{ secrets.FTP_PORT }}/downloads/

- name: Update version
run: |
Expand Down
36 changes: 12 additions & 24 deletions CREDITS.md
@@ -1,35 +1,23 @@
Current developers
---
| Steam | Github |
| Steam | GitHub |
|:-----:|:------:|
| [Bara](https://steamcommunity.com/profiles/76561198041923231/) | https://github.com/Bara |
| [good_live](https://steamcommunity.com/profiles/76561198060485155/) | https://github.com/good-live |
| [whocodes](https://steamcommunity.com/profiles/76561197987263853/) | https://github.com/whocodes |
| [Bara](https://steamcommunity.com/profiles/76561198041923231/) | [GitHub](https://github.com/Bara) |


Previous developers/Authors of useful plugins
---
- [Franc1sco](https://steamcommunity.com/profiles/76561198011608644/) (original author of basic features)
- [Darkness](https://steamcommunity.com/profiles/76561198127839952/) (for C4, RDM Manager, Health Station and some fixes)
- [Zipcore](https://steamcommunity.com/profiles/76561198035410392/)
- [Adam](https://steamcommunity.com/profiles/76561198134328733/)
- [Purixi](https://forums.alliedmods.net/member.php?u=261590) for [Decoy Teleporter](https://forums.alliedmods.net/showthread.php?p=2317390 )
- [Keplyx](https://github.com/Keplyx) for [Cameras and Drones](https://forums.alliedmods.net/showthread.php?p=2537127)
- [Any contributors](https://github.com/Bara/TroubleinTerroristTown/graphs/contributors)
- [whocodes](https://github.com/whocodes)
- [good_live](https://github.com/good-live)
- [Zipcore](https://github.com/Zipcore)
- [Keplyx](https://github.com/Keplyx)
- Adam
- Purixi
- Darkness
- Franc1sco
- [Any contributors](https://github.com/TroubleInTerroristTown/Public/graphs/contributors)


Communities with ttt servers or contribute with ideas
---
| Community | Server |
|:---------:|:------:|
| [Painlessgaming](https://painlessgaming.eu/) | 89.163.145.160:27016 |
| [Prestige Gaming](https://www.prestige-gaming.org/) | 74.91.113.113:27015 |
| [HeLLsGamers](https://hellsgamers.com/) | 67.228.181.74:27015 |
| [Dream Community](https://dream-community.de/) | csgo.dream-com.de:26266 |
| [Skynet Gaming](https://skynetgaming.net/) | 173.234.30.235:27016 |
| [Classy Wolves](https://clwo.eu) | ttt.clwo.eu |
| [Surfburken](https://surfburken.se/) | RIP |
| [Games For Life](https://gflclan.com/) | No server |
| [Frag Haven](https://fraghaven.net) | No server |
| [Allied Gaming](https://allied-gaming.com/) | No server |
| [Slayers Gaming](https://www.slayersgaming.com/) | No server |
[We are listening all servers on csgottt.com.](https://csgottt.com/)
3 changes: 2 additions & 1 deletion PUSH
Expand Up @@ -14,5 +14,6 @@ SourcePawn Update for SM1.11
Push Version
API Test
CloudFlare
Changes
Push Version
Actions still rip?

6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -3,12 +3,12 @@

| Action Status | Discord |
|:-------------:|:-------:|
| [![Action Status](https://github.com/Bara/TroubleinTerroristTown/workflows/Compile%20with%20SourceMod/badge.svg)](https://github.com/Bara/TroubleinTerroristTown/actions) | [![Discord](https://img.shields.io/discord/388685157286019072.svg)](https://discord.gg/eCsqjcD) |
| [![Action Status](https://github.com/TroubleInTerroristTown/Public/workflows/Compile%20with%20SourceMod/badge.svg)](https://github.com/TroubleInTerroristTown/Public/actions) | [![Discord](https://img.shields.io/discord/388685157286019072.svg)](https://discord.gg/eCsqjcD) |

## Links
- [On AlliedModders](https://forums.alliedmods.net/showthread.php?t=273960)
- [Recommended CVars](https://github.com/Bara/TroubleinTerroristTown/blob/master/CVARS.txt)
- [Credits](https://github.com/Bara/TroubleinTerroristTown/blob/master/CREDITS.md)
- [Recommended CVars](https://github.com/TroubleInTerroristTown/Public/blob/master/CVARS.txt)
- [Credits](https://github.com/TroubleInTerroristTown/Public/blob/master/CREDITS.md)

## For Mappers
- [Traitor Tester](https://gamebanana.com/prefabs/7553) by [Damon/skillerzz](https://gamebanana.com/members/759591)
Expand Down
2 changes: 1 addition & 1 deletion addons/sourcemod/configs/ttt/rules/start.cfg
Expand Up @@ -3,7 +3,7 @@
"1"
{
"title" "Test #1 (Text)"
"text" "Here {darkred}you can {default}add your own rules..."
"text" "Here {role t}you can {default}add your own rules..."
}
"2"
{
Expand Down
33 changes: 30 additions & 3 deletions addons/sourcemod/scripting/block_messages.sp
Expand Up @@ -2,9 +2,12 @@
#pragma newdecls required

#include <sourcemod>
#include <autoexecconfig>

ArrayList g_aMessages = null;

ConVar g_cDisableTextFilter = null;

public Plugin myinfo =
{
name = "Block messages",
Expand All @@ -19,6 +22,12 @@ public void OnPluginStart()
g_aMessages = new ArrayList(64);

CreateConVar("block_messages_version", "1.0.0", "Plugin to block some usermessage messages", FCVAR_NOTIFY | FCVAR_DONTRECORD | FCVAR_REPLICATED);
AutoExecConfig_SetCreateDirectory(true);
AutoExecConfig_SetCreateFile(true);
AutoExecConfig_SetFile("block_messages");
g_cDisableTextFilter = AutoExecConfig_CreateConVar("block_message_disable_textfilter", "1", "Disable Valve's Text Filter?",_ , true, 0.0, true, 1.0);
AutoExecConfig_ExecuteFile();
AutoExecConfig_CleanFile();

HookUserMessage(GetUserMessageId("TextMsg"), UserMsg_TextMsg, true);
}
Expand Down Expand Up @@ -53,11 +62,11 @@ public Action UserMsg_TextMsg(UserMsg msg_id, Protobuf msg, const int[] players,
{
if(reliable)
{
char sText[64];
char sText[512];
msg.ReadString("params", sText, sizeof(sText), 0);


char sBuffer[64];
char sBuffer[512];
for (int i = 0; i < g_aMessages.Length; i++)
{
g_aMessages.GetString(i, sBuffer, sizeof(sBuffer));
Expand All @@ -66,7 +75,25 @@ public Action UserMsg_TextMsg(UserMsg msg_id, Protobuf msg, const int[] players,
return Plugin_Handled;
}
}

if (g_cDisableTextFilter.BoolValue)
{
UpdateMessage(sText, sizeof(sText));
}
}

return Plugin_Continue;
}

void UpdateMessage(char[] message, int size)
{
ReplaceString(message, size, "а", "ᎴаᎴ");
ReplaceString(message, size, "о", "ᎴоᎴ");
ReplaceString(message, size, "с", "ᎴсᎴ");
ReplaceString(message, size, "е", "ᎴеᎴ");
ReplaceString(message, size, "р", "ᎴрᎴ");
ReplaceString(message, size, "у", "ᎴуᎴ");
ReplaceString(message, size, "х", "ᎴхᎴ");
ReplaceString(message, size, "п", "ᎴпᎴ");
ReplaceString(message, size, "б", "ᎴбᎴ");
}
2 changes: 1 addition & 1 deletion addons/sourcemod/scripting/discord/DiscordRequest.sp
Expand Up @@ -8,7 +8,7 @@ stock Handle PrepareRequest(DiscordBot bot, char[] url, EHTTPMethod method=k_EHT

//Format url
static char turl[128];
FormatEx(turl, sizeof(turl), "https://discordapp.com/api/%s", url);
FormatEx(turl, sizeof(turl), "https://discord.com/api/%s", url);

Handle request = SteamWorks_CreateHTTPRequest(method, turl);
if(request == null) {
Expand Down
4 changes: 2 additions & 2 deletions addons/sourcemod/scripting/discord/GuildMembers.sp
Expand Up @@ -66,9 +66,9 @@ static void GetMembers(Handle hData) {

char url[256];
if(StrEqual(afterID, "")) {
FormatEx(url, sizeof(url), "https://discordapp.com/api/guilds/%s/members?limit=%i", guild, limit);
FormatEx(url, sizeof(url), "https://discord.com/api/guilds/%s/members?limit=%i", guild, limit);
}else {
FormatEx(url, sizeof(url), "https://discordapp.com/api/guilds/%s/members?limit=%i&afterID=%s", guild, limit, afterID);
FormatEx(url, sizeof(url), "https://discord.com/api/guilds/%s/members?limit=%i&afterID=%s", guild, limit, afterID);
}

char route[128];
Expand Down
2 changes: 1 addition & 1 deletion addons/sourcemod/scripting/discord/GuildRole.sp
Expand Up @@ -28,7 +28,7 @@ static void GetGuildRoles(Handle hData) {


char url[256];
FormatEx(url, sizeof(url), "https://discordapp.com/api/guilds/%s/roles", guild);
FormatEx(url, sizeof(url), "https://discord.com/api/guilds/%s/roles", guild);

char route[128];
FormatEx(route, sizeof(route), "guild/%s/roles", guild);
Expand Down
2 changes: 1 addition & 1 deletion addons/sourcemod/scripting/discord_api.sp
Expand Up @@ -123,7 +123,7 @@ stock Handle PrepareRequest(DiscordBot bot, char[] url, EHTTPMethod method=k_EHT

//Format url
static char turl[128];
FormatEx(turl, sizeof(turl), "https://discordapp.com/api/%s", url);
FormatEx(turl, sizeof(turl), "https://discord.com/api/%s", url);

Handle request = SteamWorks_CreateHTTPRequest(method, turl);
if(request == null) {
Expand Down
2 changes: 1 addition & 1 deletion addons/sourcemod/scripting/ghostdm.sp
Expand Up @@ -49,7 +49,7 @@ public Plugin myinfo =
author = "Bara",
description = "",
version = "1.0.0",
url = "github.com/Bara/TroubleinTerroristTown"
url = "github.com/TroubleInTerroristTown/Public"
};

public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max)
Expand Down