Skip to content

Commit d92b1f9

Browse files
fix: new multicolor version support (#6)
1 parent 368a3d4 commit d92b1f9

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

addons/sourcemod/scripting/CustomChatColors.sp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ stock void LateLoad()
365365

366366
stock void LoadColorArray()
367367
{
368-
StringMap smTrie = MC_GetTrie();
368+
StringMap smTrie = CGetTrie();
369369
StringMapSnapshot smTrieSnapshot = smTrie.Snapshot();
370370
if (smTrie != null)
371371
{
@@ -1430,7 +1430,7 @@ bool ChangeSingleColor(int client, int iTarget, char Key[64], char sCol[64], boo
14301430
}
14311431
else if ((IsSource2009() && !IsValidHex(sCol)) || !IsSource2009())
14321432
{
1433-
StringMap smTrie = MC_GetTrie();
1433+
StringMap smTrie = CGetTrie();
14341434
char value[32];
14351435
if (!smTrie.GetString(sCol, value, sizeof(value)))
14361436
{
@@ -3281,7 +3281,7 @@ public void Menu_TagPrefs(int client)
32813281
public void Menu_AddColors(Menu ColorsMenu)
32823282
{
32833283
char info[64];
3284-
StringMap smTrie = MC_GetTrie();
3284+
StringMap smTrie = CGetTrie();
32853285

32863286
if (smTrie!= null && g_sColorsArray != null)
32873287
{
@@ -3716,7 +3716,7 @@ public Action Hook_UserMessage(UserMsg msg_id, Handle bf, const int[] players, i
37163716
if (strlen(sAuthorTag) > 0)
37173717
Format(g_msgSender, sizeof(g_msgSender), "{%s%s}%s%s", CCC_GetColor(sTagColorKey, sValue, sizeof(sValue)) ? "#" : "", bTagFound ? sTagColorKey : "default", sAuthorTag, g_msgSender);
37183718

3719-
StringMap smTrie = MC_GetTrie();
3719+
StringMap smTrie = CGetTrie();
37203720
if (g_msgText[0] == '>' && GetConVarInt(g_cvar_GreenText) > 0 && smTrie.GetString("green", sValue, sizeof(sValue)))
37213721
Format(g_msgText, sizeof(g_msgText), "{green}%s", g_msgText);
37223722

@@ -3736,7 +3736,7 @@ public Action Hook_UserMessage(UserMsg msg_id, Handle bf, const int[] players, i
37363736
if (!g_msgAuthor || IsClientEnabled())
37373737
{
37383738
CFormatColor(g_msgFinal, sizeof(g_msgFinal), g_msgAuthor);
3739-
MC_AddWhiteSpace(g_msgFinal, sizeof(g_msgFinal));
3739+
CAddWhiteSpace(g_msgFinal, sizeof(g_msgFinal));
37403740
}
37413741

37423742
return Plugin_Handled;
@@ -3902,7 +3902,7 @@ stock bool ConfigForward(int client)
39023902

39033903
stock bool GetColorKey(int client, CCC_ColorType colorType, char[] key, int size)
39043904
{
3905-
StringMap smTrie = MC_GetTrie();
3905+
StringMap smTrie = CGetTrie();
39063906
bool bFound = true;
39073907
char value[32];
39083908

@@ -3994,7 +3994,7 @@ stock bool GetColor(char key[32], char[] value, int size)
39943994
strcopy(value, size, key);
39953995
return true;
39963996
}
3997-
StringMap smTrie = MC_GetTrie();
3997+
StringMap smTrie = CGetTrie();
39983998
smTrie.GetString(key, value, size);
39993999
return false;
40004000
}

sourceknight.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ project:
44
dependencies:
55
- name: sourcemod
66
type: tar
7-
version: 1.11.0-git6906
8-
location: https://sm.alliedmods.net/smdrop/1.11/sourcemod-1.11.0-git6906-linux.tar.gz
7+
version: 1.11.0-git6917
8+
location: https://sm.alliedmods.net/smdrop/1.11/sourcemod-1.11.0-git6917-linux.tar.gz
99
unpack:
1010
- source: /addons
1111
dest: /addons

0 commit comments

Comments
 (0)