Raised This Month: $12 Target: $400
 3% 

[Source 2013] Custom Chat Colors


Post New Thread Reply   
 
Thread Tools Display Modes
Horsedick
AlliedModders Donor
Join Date: Sep 2011
Old 06-20-2012 , 13:12   Re: [TF2/CS:S] Custom Chat Colors
Reply With Quote #51

Quote:
Originally Posted by Dr. McKay View Post
I've often had problems with SourceBans' rehash command. Try doing sm_rehash, followed by sm_reloadadmins 5 seconds later, followed by sm_reloadccc 5 seconds later.

yeah thats what this little plugin I setup does...its 5 seconds later and it sends the sm_reloadccc to the server

as a short term or perhaps long term fix I've replaced sm_reloadccc with "sm plugins reload custom-chatcolors"

Let me know if you think of anything on that otherwise.
Horsedick is offline
pTu
Senior Member
Join Date: Nov 2010
Location: Poland
Old 06-20-2012 , 20:23   Re: [TF2/CS:S] Custom Chat Colors
Reply With Quote #52

Hello, I have a problem with plugin. In config have:
Code:
"admin_colors"
{
    "admini"
    {
    "flag"                "z"    
    "tag"                "[admin]"
    "tagcolor"        "#EE7600"
    "namecolor"        "T"
    "textcolor"        "#09F911"
    }    
}
On chat:
Quote:
[A]EE7600[admin]pTu : test
@Edit

Solved, problem with simple chat colors.

Last edited by pTu; 06-20-2012 at 20:42.
pTu is offline
moxie2020
Veteran Member
Join Date: Aug 2011
Old 06-25-2012 , 13:40   Re: [TF2/CS:S] Custom Chat Colors
Reply With Quote #53

Dumb question.

Why did simple chat colors need rewritten? Is there an issue with it?
moxie2020 is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 06-25-2012 , 13:45   Re: [TF2/CS:S] Custom Chat Colors
Reply With Quote #54

Quote:
Originally Posted by moxie2020 View Post
Dumb question.

Why did simple chat colors need rewritten? Is there an issue with it?
This supports the new custom chat colors ability. Plus I added some natives and forwards.
__________________
Dr. McKay is offline
moxie2020
Veteran Member
Join Date: Aug 2011
Old 06-25-2012 , 13:52   Re: [TF2/CS:S] Custom Chat Colors
Reply With Quote #55

Quote:
Originally Posted by Dr. McKay View Post
This supports the new custom chat colors ability. Plus I added some natives and forwards.
Oh, very cool. Trying it out. Thanks.
moxie2020 is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 06-28-2012 , 14:55   Official Modules
Reply With Quote #56

Official Modules





Toggle (v2.0.0)
Allows users to toggle their chat colors.

Commands:
sm_togglecolors - Allows the user to toggle their chat colors. By default all users can access it, even those who don't actually have chat colors. This can be overridden.

Cvars:
ccc_default_tag (default 0) - When a user joins, should the tag be disabled?
ccc_default_name (default 0) - When a user joins, should the name color be disabled?
ccc_default_chat (default 0) - When a user joins, should the chat color be disabled?
custom_chat_colors_toggle_auto_update (default 1) - Enables automatic updating (has no effect if Updater is not installed)

Changelog:
  • v2.0.0 (8/30/14)
    • Updater improvements
    • Module no longer unnecessarily writes 3 rows to the Clientprefs table for every client
    • Switched from deprecated forwards to the preferred one
  • v1.4.0 (9/16/12)
    • Updated to make use of renamed Custom Chat Colors forwards
  • v1.3.0 (9/12/12)
    • Your preferences are now properly saved in Clientprefs
  • v1.2.0 (7/12/12)
    • Added ability to disable automatic updating
  • v1.1.0 (7/3/12)
    • Module now uses Clientprefs
    • Tag, name color, and chat color can be toggled independently
  • v1.0.0 (6/28/12)
    • Initial release

Download Plugin (custom-chatcolors-toggle.smx)
View Source (custom-chatcolors-toggle.sp)


____________________________________________

MySQL (v1.1.2)
Allows MySQL to be used to configure colors. This module requires Custom Chat Colors v2.4.0 or higher. Values configured in MySQL will override values configured in custom-chatcolors.cfg.

To use this, configure a database in a configuration named "custom-chatcolors" in databases.cfg. "default" will be used if "custom-chatcolors" is not present.

Example:

Code:
    "custom-chatcolors"
    {
        "driver"            "mysql"
        "host"                "mywebsite.com"
        "database"            "mywebsite_mydatabase"
        "user"                "mywebsite_myusername"
        "pass"                "mypassword"
        //"timeout"            "0"
        //"port"            "0"
    }
A table will be automatically created. Its columns are `index`, `identity`, `flag`, `tag`, `tagcolor`, `namecolor`, and `textcolor`.

Index is a unique numerical identifier. Entries will be loaded from the database from lowest index to highest index. Just like how order is very important in custom-chatcolors.cfg, so is order important here. Ideally Steam ID entries should have the lowest indexes, followed by higher admin flags. For example, if you want to configure STEAM_0:0:23071901, admin flag "b", and admin flag "a" to have separate colors, you would need to do this (assuming "b" admins also have "a"):

Code:
index        identity                flag
-----------------------------------------
1            STEAM_0:0:23071901      NULL
2            Admins                  b
3            Donors                  a
The `identity` field can either hold a Steam ID or a group name. The identity field must be unique. If identity is not a Steam ID, it is ignored, just like section names in custom-chatcolors.cfg.

If `flag` is NULL and identity is not a Steam ID, this entry will match all users. If specifying a flag, it should be a single admin flag character.

The `tag` field should contain the tag to be applied to users who match the entry, or NULL for none.

The `tagcolor`, `namecolor`, and `textcolor` fields should contain hexadecimal color codes, 6 or 8 digits (the final 2 digits are for alpha if specifying an 8-digit code). Do not prefix color codes with a # symbol. "O", "G", and "T" can be specified for olive, green, and team colors, respectively.

If any of the `tag`, `tagcolor`, `namecolor`, or `textcolor` fields are NULL, they will be simply ignored (and not assigned to users). However, if the user was given a tag, tag color, name color, or text color by custom-chatcolors.cfg and MySQL's value is NULL (or invalid), the color/tag specified in custom-chatcolors.cfg will be kept.

Values will be reloaded from the database when sm_reloadccc is executed.

Commands:
sm_ccc_mysql_dump - Dumps cached data to a file. Used for debugging.

Cvars:
ccc_mysql_auto_update (default 1) - Enables automatic updating (has no effect if Updater is not installed)

Changelog:
  • v1.1.0 (2/17/13)
    • Fixed issues that prevented colors from being applied
  • v1.0.0 (2/11/13)
    • Initial release

Download Plugin (custom-chatcolors-mysql.smx)
View Source (custom-chatcolors-mysql.sp)


____________________________________________

Clan Tag (v1.0.1)
Automatically assigns users a chat tag based on their clan tag (CS only)

Cvars:
ccc_clantag_users_only (default 1) - If 1, then only clients who aren't assigned a tag by custom-chatcolors.cfg (or the MySQL module) are given a clan tag
ccc_clantag_color (default "G") - The color to give clan tags, in hexadecimal form (RRGGBB or RRGGBBAA). Special colors can be used: G for green, T for team color, O for olive, and blank for default
ccc_clantag_auto_update (default 1) - Enables automatic updating (has no effect if Updater is not installed)

Changelog:
  • v1.0.0 (4/10/13)
    • Initial release

Download Plugin (custom-chatcolors-clantag.smx)
View Source (custom-chatcolors-clantag.sp)


____________________________________________

Distinguish (v1.0.0)
Allows admins to "distinguish" their messages by prefixing them with a special prefix.

Cvars:
sm_ccc_distinguish_prefix (default "#") - Messages that begin with this character or string will be considered distinguished
sm_ccc_distinguish_tag (default -1) - -1 = display tag always, 0 = only display tag when not distinguished, 1 = only display tag when distinguished
sm_ccc_distinguish_name (default -1) - -1 = color name always, 0 = only color name when not distinguished, 1 = only color name when distinguished
sm_ccc_distinguish_chat (default -1) - -1 = color chat always, 0 = only color chat when not distinguished, 1 = only color chat when distinguished
custom_chat_colors_distinguish_auto_update (default 1) - Enables automatic updating (has no effect if Updater is not installed)

Overrides:
By default, everyone can distinguish their messages. To only allow some players to distinguish messages, override sm_ccc_distinguish in admin_overrides.cfg.

Changelog:
  • v1.0.0 (7/8/13)
    • Initial release

Download Plugin (custom-chatcolors-distinguish.smx)
View Source (custom-chatcolors-distinguish.sp)


.

Last edited by Dr. McKay; 07-14-2020 at 04:26.
Dr. McKay is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 06-28-2012 , 16:05   Re: [TF2/CS:S] Custom Chat Colors
Reply With Quote #57

nice update - thanks
__________________
View my Plugins | Donate
TnTSCS is offline
minimoney1
SourceMod Donor
Join Date: Dec 2010
Old 06-28-2012 , 16:24   Re: [TF2/CS:S] Custom Chat Colors
Reply With Quote #58

McKay, y u no use clientprefs?
I'm making a version that is more extensible on the users' side, I'll give you the source when it's done. (And yes, it uses clientprefs).
minimoney1 is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 06-28-2012 , 16:34   Re: [TF2/CS:S] Custom Chat Colors
Reply With Quote #59

Quote:
Originally Posted by minimoney1 View Post
McKay, y u no use clientprefs?
I'm making a version that is more extensible on the users' side, I'll give you the source when it's done. (And yes, it uses clientprefs).
I didn't really think Clientprefs was necessary in this case, and I want this to still work for people who don't have Clientprefs working for whatever reason.

What are you adding?
__________________
Dr. McKay is offline
minimoney1
SourceMod Donor
Join Date: Dec 2010
Old 06-28-2012 , 16:42   Re: [TF2/CS:S] Custom Chat Colors
Reply With Quote #60

Adding the option for clients to choose whether they want to hide their tag, name, or chat color.
minimoney1 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:24.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode