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

Extracted and spectator filter missing in CFG file (NMRiH) #83

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.vscode
plugins/
*.zip
5 changes: 0 additions & 5 deletions .vscode/desktop.ini

This file was deleted.

3 changes: 0 additions & 3 deletions .vscode/settings.json

This file was deleted.

34 changes: 0 additions & 34 deletions .vscode/tasks.json

This file was deleted.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

A Sourcemod plugin which allows other plugins to add and manage chat related features.

🍴 This is a fork of [Drixevel's Chat Processor](https://github.com/Drixevel-Archive/Chat-Processor) that uses MultiColors instead of ColorVariables. Use it if you're having issues with the original.

## Installation

Place the .smx into the plugins folder and the .cfg into the configs folder.
Expand Down
10 changes: 10 additions & 0 deletions configs/chat_processor.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,14 @@
"HL2MP_Chat_AllDead" "*DEAD* {1} : {2}"
"HL2MP_Chat_AllSpec" "*SPEC* {1} : {2}"
}

"nmrih"
{
"SDK_Chat_Team" "(TEAM) {1} : {2}"
"SDK_Chat_Team_Dead" "*DEAD*(TEAM) {1} : {2}"
"SDK_Chat_Spec" "(Spectator) {1} : {2}"
"SDK_Chat_All" "{1} : {2}"
"SDK_Chat_All_Dead" "(DEAD) {1} : {2}"
"SDK_Chat_All_Spec" "(SPEC) {1} : {2}"
}
}
Binary file removed plugins/chat-processor.smx
Binary file not shown.
13 changes: 6 additions & 7 deletions scripting/chat-processor.sp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//Includes
#include <sourcemod>
#include <chat-processor>
#include <colorvariables>
#include <multicolors>

////////////////////
//ConVars
Expand Down Expand Up @@ -235,8 +235,8 @@ public Action OnSayText2(UserMsg msg_id, BfRead msg, const int[] players, int pl

if (strlen(sFlags) == 0 || !CheckCommandAccess(author, "", ReadFlagString(sFlags), true))
{
CRemoveColors(sName, sizeof(sName));
CRemoveColors(sMessage, sizeof(sMessage));
CRemoveTags(sName, sizeof(sName));
CRemoveTags(sMessage, sizeof(sMessage));
}
}

Expand Down Expand Up @@ -393,7 +393,7 @@ public void Frame_OnChatMessage(DataPack pack)
//Process colors based on the final results we have.
if (iResults == Plugin_Changed && bProcessColors)
{
CProcessVariables(sBuffer, sizeof(sBuffer));
CFormatColor(sBuffer, sizeof(sBuffer), author);

//CSGO quirk where the 1st color in the line won't work..
if (game == Engine_CSGO)
Expand Down Expand Up @@ -429,8 +429,7 @@ public void Frame_OnChatMessage(DataPack pack)
if (iResults == Plugin_Stop || iResults == Plugin_Handled)
continue;

CSetNextAuthor(author);
CPrintToChat(client, "%s", sTempBuffer);
CPrintToChatEx(client, author, "%s", sTempBuffer);
}
}
}
Expand Down Expand Up @@ -683,7 +682,7 @@ bool SetTagColor(int client, const char[] tag, const char[] color)
if (StrContains(sTag, tag, false) == -1)
continue;

CRemoveColors(sTag, sizeof(sTag));
CRemoveTags(sTag, sizeof(sTag));
Format(sTag, sizeof(sTag), "%s%s", color, sTag);

g_Tags[client].SetString(i, sTag);
Expand Down
4 changes: 0 additions & 4 deletions scripting/compile.bat

This file was deleted.

Loading