Request/Idea:
Can you create a feature so that the custom chat colors can be applied to groups that have a specified command override, rather than using the flags? So you'd put the "command_override" key instead of the "flag" key, and a custom override would be the value, and that override would go in the admin_groups file.
For example:
Code:
"admin_colors"
{
"Admin"
{
"command_override" "customchatcolors_admin" //Instead of "flag" key, this is where you'd put a custom command override
"tag" "[Admin] "
"tagcolor" "#4294FF"
}
}
Request/Idea:
Can you create a feature so that the custom chat colors can be applied to groups that have a specified command override, rather than using the "flag" key? So you'd put the "command_override" key, and a custom override would be the value, and that override would go in the admin_groups file.
For example:
Code:
"admin_colors"
{
"Admin"
{
"command_override" "customchatcolors_admin" //Instead of "flag" key, this is where you'd put a custom command override
"tag" "[Admin] "
"tagcolor" "#4294FF"
}
}
I tried to attempt this myself but it isn't working, CheckCommandAccess is confusing me entirely. Maybe CheckCommandAccess isn't the right native to use... Whatever the case, maybe you guys know a solution to the issue:
Dr. McKay's Code (snipped):
Spoiler
PHP Code:
new AdminId:admin = GetUserAdmin(client); new AdminFlag:flag; decl String:configFlag[2]; decl String:section[32]; new bool:found = false; do { KvGetSectionName(configFile, section, sizeof(section)); KvGetString(configFile, "flag", configFlag, sizeof(configFlag)); if(strlen(configFlag) > 1) { LogError("Multiple flags given in section \"%s\", which is not allowed. Using first character.", section); } if(strlen(configFlag) == 0 && StrContains(section, "STEAM_", false) == -1 && StrContains(section, "[U:1:", false) == -1) { found = true; break; } if(!FindFlagByChar(configFlag[0], flag)) { if(strlen(configFlag) > 0) { LogError("Invalid flag given for section \"%s\", skipping", section); } continue; } if(GetAdminFlag(admin, flag)) { // The part where McKay checks if client has the flag access thingy. found = true; break; } } while(KvGotoNextKey(configFile)); if(!found) { return; } }
My Code (snipped):
Spoiler
PHP Code:
decl String:configFlag[2]; decl String:section[32]; new bool:found = false; do { KvGetSectionName(configFile, section, sizeof(section)); KvGetString(configFile, "custom_override", configFlag, sizeof(configFlag)); if(strlen(configFlag) == 0 && StrContains(section, "STEAM_", false) == -1 && StrContains(section, "[U:1:", false) == -1) { found = true; break; } if(CheckCommandAccess(client, configFlag, -1, false)) { // The part where I check if Client has access to the custom_override found = true; break; } } while(KvGotoNextKey(configFile)); if(!found) { return; } }
I tried to attempt this myself but it isn't working, CheckCommandAccess is confusing me entirely. Maybe CheckCommandAccess isn't the right native to use... Whatever the case, maybe you guys know a solution to the issue:
Spoiler
Dr. McKay's Code (snipped):
Spoiler
PHP Code:
new AdminId:admin = GetUserAdmin(client); new AdminFlag:flag; decl String:configFlag[2]; decl String:section[32]; new bool:found = false; do { KvGetSectionName(configFile, section, sizeof(section)); KvGetString(configFile, "flag", configFlag, sizeof(configFlag)); if(strlen(configFlag) > 1) { LogError("Multiple flags given in section \"%s\", which is not allowed. Using first character.", section); } if(strlen(configFlag) == 0 && StrContains(section, "STEAM_", false) == -1 && StrContains(section, "[U:1:", false) == -1) { found = true; break; } if(!FindFlagByChar(configFlag[0], flag)) { if(strlen(configFlag) > 0) { LogError("Invalid flag given for section \"%s\", skipping", section); } continue; } if(GetAdminFlag(admin, flag)) { // The part where McKay checks if client has the flag access thingy. found = true; break; } } while(KvGotoNextKey(configFile)); if(!found) { return; } }
My Code (snipped):
Spoiler
PHP Code:
decl String:configFlag[2]; decl String:section[32]; new bool:found = false; do { KvGetSectionName(configFile, section, sizeof(section)); KvGetString(configFile, "custom_override", configFlag, sizeof(configFlag)); if(strlen(configFlag) == 0 && StrContains(section, "STEAM_", false) == -1 && StrContains(section, "[U:1:", false) == -1) { found = true; break; } if(CheckCommandAccess(client, configFlag, -1, false)) { // The part where I check if Client has access to the custom_override found = true; break; } } while(KvGotoNextKey(configFile)); if(!found) { return; } }
^
decl String:configFlag[2];
Seems a little bit too little for an override, unless you are only using one single character in your override names?
^ "customchatcolors_admin" is much longer than what you can put in a decl String:configFlag[2];.
I suggest -
Try decl String:configFlag[32];, or if you want them with incredibly long names, something like decl String:configFlag[128]; to decl String:configFlag[256];.
Haven't looked into if overrides has a maximum length they can be though.
Ive been running CCC on my server for about 6 months. Suddenly, the plugin has stopped working for only certain users on the servers. Some of my mods and some VIPs no longer have working tags. Some people do have working tags, it is a very odd situation. There is no similiaritys I can see of users who have working tags and those who don't. This problem happened a few months back and was due to files parsing because our sourcemod was out of date - but our SM is fresh installed and I dont see parsing in our error logs.
our CCC.CFG is attached. Thank you so much, and if we can find a solution to this problem we would really appreciate it!
Quote:
// Custom Chat Colors is written by Dr. McKay (http://www.doctormckay.com)
// Simple Chat Colors (Redux) is written by Antithasys
// The configuration is very similar, so I've stolen Redux's documentation
//
// How to edit this file:
// "admin_colors" <-- Leave this alone
// {<-- Add all groups/steamids after first bracket (Leave this alone)
//
// "STEAM_1:1:1234567" <-- //Here is a steamid example with a tag (don't duplicate steamids)
// {
// "namecolor" "#RRGGBB" // <-- This is the color for the name (#RRGGBB in hex notation or #RRGGBBAA with alpha)
// "textcolor" "#RRGGBBAA" // <-- This is the color of the text
// }
//
// "groupname" //<-- This can either be a steamid for a specific player, or a group name
// { //<-- Open the group
// "flag" "z" //<-- This is the flag(s) assoicated with the group. This field doesn't matter if the group name //is a steamid
// "tag" "[admin]" //<-- This is the text for the tag
// "tagcolor" "O" //<-- This is the color for the tag
// "namecolor" "G" //<-- This is the color for the name
// "textcolor" "T" //<-- This is the color of the text
// } //<-- Close the group
// } //<-- Add all groups/steamids before last bracket (Leave this alone)
//
// NOTE:
// If you don't enter a steamid then the group name does not matter, it's just for //your reference.
//
// For colors, either a hex notation of a color (#RRGGBB or #RRGGBBAA) or one of the //supported shortcuts (O - Olive, G - Green, T - Team) is required
//
// --------ORDER OF OPERATIONS--------
//
// The order in which you place items in the config file matters. Here is what //determins what color they get:
// 1. SteamID
// If there is a steamid present, it will always override everything. If you //put a steamid in twice
// then the first entry (top to bottom) will be used. (I think, just don't do //it!)
// 2. Groups
// The plugin will search (top to bottom) for a postitive match for the flag //string. The player' flags
// will be compared with the group flag character (NOTE: only one flag per //group! "a" is okay, "ab" is NOT),
// and if the player has the flag, it will stop there.
// For example. Admins with the "ad" flags and donators with the "a" flag. If //you place the "a" flag group
// above the "d" group then the admin will get the "a" colors. Order matters.
//
// ---------DO NOT EDIT ABOVE THIS LINE---------
"admin_colors"
{
//-----[DEV]-----
Ive been running CCC on my server for about 6 months. Suddenly, the plugin has stopped working for only certain users on the servers. Some of my mods and some VIPs no longer have working tags. Some people do have working tags, it is a very odd situation. There is no similiaritys I can see of users who have working tags and those who don't. This problem happened a few months back and was due to files parsing because our sourcemod was out of date - but our SM is fresh installed and I dont see parsing in our error logs.
our CCC.CFG is attached. Thank you so much, and if we can find a solution to this problem we would really appreciate it!
May I ask why you don't use just an flag for VIPs instead? That's so much work you have there. I think that should also fix your problem. I guess that the file is just too big maybe.