AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Simple Chat Colors (Redux) (https://forums.alliedmods.net/showthread.php?t=167814)

Antithasys 09-20-2011 13:29

Simple Chat Colors (Redux)
 
1 Attachment(s)
Simple Chat Colors

Description:
Allows admins to set chat colors and tags for players or groups of players.
Console Variables:
None.
Commands:
sm_reloadscc - Reloads the config file
sm_printcolors - Prints chat colors to the screen (ingame only)
Installation:
Place the simple-chatcolors.smx in the /sourcemod/plugins dir.
Place the simple-chatcolors.cfg file in the /sourcemod/configs dir.
Changelog:

Quote:

2.0.0
Release
Notes:

This plugin uses the Simple Chat Processor to manipulate chat. This is a very different plugin from the previous versions. There are no override commands, or cvars. It now uses the SMLIB colors include file as well.

SVN (or Beta Links)

If you want the latest version on the SVN you can use the links below. The release version of the plugin is attached.

Source | Plugin | Config | No Phrases

Enjoy!

Antithasys 09-20-2011 13:30

Re: Simple Chat Colors
 
Reserved. (Config file instructions coming soon!)

Dave830 09-20-2011 14:27

Re: Simple Chat Colors (Redux)
 
I've upgraded my server's simple chat plugins to 2.0, and now the simple chat colors config file throws errors when loaded / reloaded:

Quote:

11:24:03 KeyValues Error: LoadFromBuffer: missing { in file addons\sourcemod\configs\simple-chatcolors.cfg

KeyValues Error: LoadFromBuffer: missing { in file addons\sourcemod\configs\simple-chatcolors.cfg
The config file is saved as utf-8. It loads correctly when saved as ANSI. Before we updated, it loaded fine as utf-8.

Edit: It doesn't log the error unfortunately. When I reload the simple chat colors plugin, no errors are thrown. But in-game, the tags defined in the cfg aren't displaying. When I use sm_reloadscc, the KeyValues Error is thrown in console only.

Check my pm for the cfg file.

Antithasys 09-20-2011 14:32

Re: Simple Chat Colors (Redux)
 
I need more of the error message. There should be a line number reference. I do not think there is anything that would prevent utf-8 from functioning properly. I did change the way the config file is loaded. I did this to mainly make the keys optional. So blank keys are not needed anymore. I am looking at the code now, but a edit of your post with more error info would be great.

Edit:

I think that error is related to the KvValues function not reconizing a closed group due to a utf-8 char being near it, or right before it. Please post config file. The file, not a copy and paste.

Thanks.

Jstn7477 09-21-2011 17:34

Re: Simple Chat Colors (Redux)
 
Nice, I was looking forward to a newer version of SCC. I'll try this on one of my servers and make sure it's good to go before I replace SCCold. Glad to see some new colors.

Snaggle 09-22-2011 05:12

Re: Simple Chat Colors (Redux)
 
The bug with players that use { and } in their name still exists.

My Name: {test}Snaggle [UK]
How it looks in game: [Tag] ]{test}Snaggle [UK]


The ] in the name will appear for anyone who uses {} in their name. Anyway to fix that?

Antithasys 09-22-2011 13:25

Re: Simple Chat Colors (Redux)
 
Since I do not parse the text myself, I just send to to SMLIB and the sort, the problem has to be there. I will ask berni if he see's a reason for it.

Snaggle 09-22-2011 17:58

Re: Simple Chat Colors (Redux)
 
Okay thanks and congratulations on super mod :)

Another quick question, can I assign a tag to everyone with a certain flag that is not in a group? For example I have a plugin that gives certain players the flag "S", but they are not in any groups.

Antithasys 09-22-2011 18:02

Re: Simple Chat Colors (Redux)
 
I think you are confusing "groups" with admin groups. There is no link between these. Think of these groups as completely separate, but could share the same name. So, just create a group in the config that has the correct, valid, flag. Name it whatever you want, and apply the colors and tags.

... and thanks! :3

Jstn7477 09-22-2011 23:36

Re: Simple Chat Colors (Redux)
 
Hi Antithasys,

I just tried this on one of my lightly used servers for evaluation, and I seem to be having some color issues. Not all of the colors defined by SMLIB for TF2 seem to be working (specifically orange, haven't tested black), and some of the standard colors aren't right e.g. blue = green.

Screenshot of sm_printcolors: http://steamcommunity.com/id/jstn747...49433666653950

I used my admin_colors definitions from the original SCC, but changed all the color keyvalues with the ones defined by SMLIB colors. No SM error logs were found, and the normal logs show 2 lines from simple-chatprocessor.smx:

Code:

L 09/22/2011 - 22:57:44: [simple-chatprocessor.smx] [SCP] Recognized mod [Team Fortress 2].
L 09/22/2011 - 22:57:44: [simple-chatprocessor.smx] [SCP] Loading translation file [scp.tf.phrases].

Not sure what the issue may be, but I just figured I would send some info your way. Let me know if you need anything else log or configuration wise from my server. :3

Antithasys 09-23-2011 00:33

Re: Simple Chat Colors (Redux)
 
There are two issues going on here.

1. You were on the red team and no one was on the blue team. This made it so blue was an invalid color and therefore replaced with green.

2. Orange and Black are really the same color in TF2, and the color shown depends on if the item found event was fired. Black before an item found event, and yellow/orange afterwards.

Changing to the SMLIB doesn't add colors, well did add these two, but overall the colors available are the same. SMLIB just exposed the orange/black color as well as grey (spectator) color. It also gives you fallback colors. Both SMLIB and the colors.inc by Exvel can only use what the game engine provides, and what they provide has not changed. I switched to SMLIB for coding reasons really, but the side benefit is that it exposed these variations.

EDIT:

I updated the SVN for this plugin with some minor changes to the PrintColors command. It now shows how all the colors are presented and gives a little more information. Check out the beta links if you want to use it. This is the only change and not suggested unless for general use.

Jstn7477 09-23-2011 10:53

Re: Simple Chat Colors (Redux)
 
Thanks for the explanation. I got excited when I saw the color listing for SMLIB but forgot about the past problems with orange/black.

I'll be testing and letting you know if I encounter any other problems. I use a lot of your Simple Plugins and they bring some great functionality to my servers. :3

deathcurse 09-23-2011 11:06

Re: Simple Chat Colors (Redux)
 
Using the new version of this plugin on our servers and seems to be working great so far. Thanks!

poppin-fresh 09-23-2011 12:43

Re: Simple Chat Colors (Redux)
 
Can you please add a cvar so your chat colors are only applied when you type # ??

Antithasys 09-23-2011 20:15

Re: Simple Chat Colors (Redux)
 
Quote:

Originally Posted by poppin-fresh (Post 1561515)
Can you please add a cvar so your chat colors are only applied when you type # ??

No. That doesn't seem to be something that would be useful past yourself. Feel free to edit the plugin for just your servers thou.

poppin-fresh 09-23-2011 23:35

Re: Simple Chat Colors (Redux)
 
It wasn't even my idea. It was auggested to me because some people want to choose when the type with the chat Not all the time. say if its for an admin and their trying to be undercover and their text is [admin] cover blown

wawazy 09-27-2011 22:42

Re: Simple Chat Colors (Redux)
 
just replaced with this new version on server and nothing wrong for now


Thank for this plugin

wa

BaconCat 09-29-2011 21:27

Re: Simple Chat Colors (Redux)
 
Installed and working perfectly. Now my Donators/Admins all have Team Coloured chat text in TF2. :D

psychonic 09-30-2011 09:05

Re: Simple Chat Colors (Redux)
 
@ Antithasys

Code:
public OnLibraryRemoved(const String:name[]) {     if (StrEqual(name, "scp"))     {         SetFailState("Simple Chat Processor Unloaded.  Plugin Disabled.");     } }

You don't need to do that manually. Since REQUIRE_PLUGIN is defined by default and your scp.inc is correct, it will already fail when that is unloaded.

Antithasys 09-30-2011 13:17

Re: Simple Chat Colors (Redux)
 
Nice. I was wondering why that never seemed to run... lol.

Eyelanderules 09-30-2011 18:34

Re: Simple Chat Colors (Redux)
 
The plugin seems to not work for me, Not work as in the chatcolors won't come up, i tryed a few things like spelling out the color, reseting server editing the file, even starting fresh, idk wuts wrong :cry:

Antithasys 09-30-2011 18:55

Re: Simple Chat Colors (Redux)
 
Quote:

Originally Posted by Eyelanderules (Post 1566125)
The plugin seems to not work for me, Not work as in the chatcolors won't come up, i tryed a few things like spelling out the color, reseting server editing the file, even starting fresh, idk wuts wrong :cry:

Did you get the processor too?

Eyelanderules 09-30-2011 19:07

Re: Simple Chat Colors (Redux)
 
Ok :) I didnt see the other plugins that go with it, it works but in chat it says: all default white colors

A{light gree[I Own this Bitch]t{Light greee{AN} Eyelander : test

Antithasys 09-30-2011 19:12

Re: Simple Chat Colors (Redux)
 
Use the correct color tags from SMLIB. The colors are not spelled out.

Eyelanderules 09-30-2011 19:39

Re: Simple Chat Colors (Redux)
 
Ok the plugin works now but im not sure how to fix this in my name and make it so that every admin can use typeing colors, only low admins can use typeing colors for some reason. It added an extra letter in my tag tho:
[I Own this Bitch]t{AN} Eyelander : test
Not sure where the extra t is comeing from

Snaggle 10-01-2011 13:56

Re: Simple Chat Colors (Redux)
 
Look here, it seems to be a problem with players who use { and } in their names. No fix for it yet though.

BaconCat 10-03-2011 08:00

Re: Simple Chat Colors (Redux)
 
Quote:

Originally Posted by Antithasys (Post 1561245)
2. Orange and Black are really the same color in TF2, and the color shown depends on if the item found event was fired. Black before an item found event, and yellow/orange afterwards.

I was wondering about this. Is there a way so I can make it JUST orange?

ATM I have it set so Donators have Team Text and Admins (i.e. me) have "Black" Text. Is there a way I can set it to always be orange instead of "Black for a bit, then orange afterwards"?

Antithasys 10-03-2011 08:57

Re: Simple Chat Colors (Redux)
 
Quote:

Originally Posted by BaconCat (Post 1567573)
I was wondering about this. Is there a way so I can make it JUST orange?

ATM I have it set so Donators have Team Text and Admins (i.e. me) have "Black" Text. Is there a way I can set it to always be orange instead of "Black for a bit, then orange afterwards"?

No. Not possible to make it consistent.

BaconCat 10-03-2011 10:17

Re: Simple Chat Colors (Redux)
 
Fair enough. :) I can live! :D

Horsedick 10-03-2011 21:27

Re: Simple Chat Colors (Redux)
 
I'll load this in the morning but the question I have is from the old version but may go over to the new one...But I've got the CFG setup with an ADMIN tag from a set flag, and a Donator tag from a set flag for that group....regular users are not altered at all.

I had a user come on tonight and some how managed to insert something in the chat line or whatever to circumvent the Admin flag and have it show the exact colors used in the ADMIN tag and others for admins when chatting..

It was done like this from a console view:

(TO ADMIN) oo2J2Jii1: PUT Me In plz L 10/03/2011 - 19:43:00: [basechat.smx] oo2J2Jii1<143><STEAM_0:XXXXXXXXX><> triggered sm_chat (text PUT Me In plz)
Now I guess my question is how did he do this so I can prevent it cause last thing I need is people impersonating Admins for scamming purposes..and will this new version kill this ability?

Thanks

Antithasys 10-03-2011 21:32

Re: Simple Chat Colors (Redux)
 
The to admin part makes me think he triggered admin chat, and your settings are such that non-admins can communicate with admins via the trigger. For instance, if I join your server and type @hello admins. That message would be sent to admins, not players.

Horsedick 10-03-2011 22:02

Re: Simple Chat Colors (Redux)
 
Quote:

Originally Posted by Antithasys (Post 1568027)
The to admin part makes me think he triggered admin chat, and your settings are such that non-admins can communicate with admins via the trigger. For instance, if I join your server and type @hello admins. That message would be sent to admins, not players.


ok is there a way to prevent this for obvious reasons?

Edit: I tested this with a regular user typing in chat " @hello admins " nothing happened

Antithasys 10-03-2011 22:07

Re: Simple Chat Colors (Redux)
 
While none of this has anything to do with this plugin at all... you can change the cvar and settings in your basechat plugin. If you have any further questions regarding this start a thread in the general section on the forums.

edit:
say_team @hello admins

Horsedick 10-03-2011 22:40

Re: Simple Chat Colors (Redux)
 
Quote:

Originally Posted by Antithasys (Post 1568044)
While none of this has anything to do with this plugin at all... you can change the cvar and settings in your basechat plugin. If you have any further questions regarding this start a thread in the general section on the forums.

edit:
say_team @hello admins

yeah thanks for the help...I really wasn't sure if it did or not cause it did trigger a plugin but wasn't 100% what was going on so thanks!

Antithasys 10-04-2011 17:41

Re: Simple Chat Colors (Redux)
 
Quote:

Originally Posted by Snaggle (Post 1560648)
The bug with players that use { and } in their name still exists.

My Name: {test}Snaggle [UK]
How it looks in game: [Tag] ]{test}Snaggle [UK]


The ] in the name will appear for anyone who uses {} in their name. Anyway to fix that?

Since a fix for this didn't require a code change on my part, I went ahead and looked at the SMLIB code and think I found the issue. The SVN has the latest version compiled against this fix. Go ahead and test it out and let me know.

Horsedick 10-04-2011 21:46

Re: Simple Chat Colors (Redux)
 
I loaded it today and it works great... only issue I'm having is my NAME color that I set to black was black this morning after loading...then later today it went to yellow then a few mins ago it went to orange/brownish color

the cfg isn't changed still says BLA for namecolor

what could be causing this? Conflicting from the 3rd person plugin I'm using?

Snaggle 10-05-2011 07:03

Re: Simple Chat Colors (Redux)
 
Quote:

Originally Posted by Horsedick (Post 1568633)
I loaded it today and it works great... only issue I'm having is my NAME color that I set to black was black this morning after loading...then later today it went to yellow then a few mins ago it went to orange/brownish color

the cfg isn't changed still says BLA for namecolor

what could be causing this? Conflicting from the 3rd person plugin I'm using?

In TF2 black is what shows before no items have been found. Whe an item is found, the black will change to whatever colour the last item found was.

For example, I find a normal item in game, my name will now become yellow. If someone crafts a Valve item (lol) then my name will become purple.

Black will only be black at the start of the round until someone finds/crafts/unboxes/deletes an item etc.

Eyelanderules 10-05-2011 17:29

Re: Simple Chat Colors (Redux)
 
It works fine but all im haveing problems about is that why do lower admin (Bottom of list chatcolor) have chat color but none of the higher ones do, on all 3 lines:

"STEAM_0:1:24710900"
{
"tag" "[I Own this Bi**h]"
"tagcolor" "{L}"
"namecolor" "{BLA}"
}
"Admins"
{
"flag" "z"
"tag" "[High Admin]"
"tagcolor" "{OG}"
"namecolor" "{T}"
}
"VIP"
{
"flag" "a"
"tag" "[Admin]"
"tagcolor" "{B}"
"namecolor" "{T}"
"textcolor" "{N}"
}

I want to make it so high admins and me (Owner) can also use chat colors

Eyelanderules 10-05-2011 17:30

Re: Simple Chat Colors (Redux)
 
It works fine but a small exploit i found is that with chat txt color, in tf2 if someone finds, an vintage,strange,genuine,unusual, ect all the admins chat txt colors change to that color. All my admins like the other colors for chat txt but i don't think they are in the plugin. (Purple and vintage blue) were great chat txt colors :)

Eyelanderules 10-05-2011 17:36

Re: Simple Chat Colors (Redux)
 
Nevermind, im retarded, i added another line, the first time i did it, it messed up the whole .txt file, ik wut i did wrong. Sorry for your time reading above :3


All times are GMT -4. The time now is 07:36.

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