AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=109)
-   -   Simple Chat Colors (Old Version) (https://forums.alliedmods.net/showthread.php?t=105150)

Antithasys 10-01-2009 18:21

Simple Chat Colors (Old Version)
 
1 Attachment(s)
Use the new version located here.

Simple Chat Colors and more

Description:

Allows admins to set chat colors for players or groups of players. See feature list for complete description.
Plugin is part of the Simple Plugins project.


Features:
  • Set the color of the players name
  • Set the color of the players chat message
  • Set the color for a specific player or group of players
  • Allows tagging of players or group of players
  • Allows for clan messages (trigger = #)
  • Allows for dead chat display options
  • Allows for auto-responses based upon chat message *NEW
  • Allows for override commands
  • Supports color tags in chat messages *NEW
  • Supports Gag & Silence
  • Supports antiflood timeouts (replaces base plugin)
  • Supports all colors in the colors.inc file by exvel
  • Uses loghelper.inc by psychonic for compability with HLstatsxCE

Commands:
  • sm_reloadscc - Reloads chat colors from config file *NEW
  • sm_printcolors - Prints the chat colors and names to the screen *NEW

Console Variables:
  • scc_debug - Enable/Disable debugging information *NEW
  • scc_triggerbackup - Enable/Disable the backup for detecting chat triggers
  • scc_deadchat - 0 = Dead can't see or type chat, 1 = Dead can see all chat and type to other dead players, 2 = Dead can see and type chat to all *NEW
  • scc_clanchat_enabled - Enable/Disable clan chat triggers
  • scc_clanflag - Admin flag given to clan members
  • scc_chatcolortags_enabled - Enable/Disable color tags in chat messages *NEW
  • scc_autoresponse_enabled - Enable/Disable auto-responses to chat messages *NEW
  • scc_chatfilter_enabled - Enable/Disable banned words in chat messages *NEW
  • scc_flood_time - Amount of time allowed between chat messages

Installation:
  • Place the simple-chatcolors.smx in the /sourcemod/plugins dir.
  • Place the simple-chatcolors.cfg file in the /sourcemod/configs dir.
  • Place the simple-chatfilter.cfg file in the /sourcemod/configs dir.
  • Place the simple-chatresponses.cfg file in the /sourcemod/configs dir.
  • Place the scc.phrases.txt file in the /sourcemod/translations dir.
Changelog:
Quote:

(27/08/11): Version 1.3.0
-----------------------
+ Added clan chat tag to translation file
+ Added cvar for passing color tags within chat message (tagged players only)
+ Added additional debug messages for phrase auto responses
! Fixed invalid group flagbits giving everyone chat colors
! Fixed invalid clan flagbits giving everyone clan chat
! Fixed invalid targets when gaging causing translation error
! Fixed color tags being passed when banned word were said by non-tagged players
! Fixed say event not firing if chat is processed
? Fixed cvar misspellings
? Renamed commands to reflect changes

(16/08/11): Version 1.2.2
-----------------------
! Fixed more than one team color error firing incorrectly

(15/08/11): Version 1.2.1
-----------------------
+ Added support for antiflood
+ Added translation support
! Fixed clanchat flag being reset on client disconnect

(06/08/11): Version 1.2.0
-----------------------
+ Added clan chat feature
+ Added dead chat feature
+ Added support for gags with base SourceMod plugin
! Fixed chat for spectators
! Fixed player names with color tags producing colors
? Renamed most of the console variables
? Compiled against new colors.inc file
? Compiled against new simple-plugins.inc file

(22/12/09): Version 1.1.0
-----------------------
+ Added tag prefixes with colors
+ Added overrides group to config file
+ Added everyone group to config file
! Fixed chat tags for Left 4 Dead 1/2
? Removed unnecessary code
? Compiled against new simple-plugins.inc file
? Compiled against new colors.inc file

(03/10/09): Version 1.0.2
-----------------------
+ Added game type detection
+ Added cvar sm_chatcolors_triggerbackup
! Fixed % being allowed in chat messages
! Fixed null or blank messages being passed
! Fixed passing raw strings to format functions causing crash
! Fixed improper spacing after :
! Fixed spectator and dead tags again
? Consolidated functions

(02/10/09): Version 1.0.1
-----------------------
+ Added command sm_printchatcolors to see what the colors do
! Fixed colors getting wrong result
! Fixed spectator chat showing up as dead chat
? Clarified what colors could not be used together in .cfg file

(01/10/09): Version 1.0.0
-----------------------
Initial Release
Features/Bugs:
Please use the project site to report all bugs and request additional features.

Future Updates:

Latest beta can be located here.
Change log here.
Code changes here.
New example .cfg files here.
New translation file here.
____
*See changelog for recent revisions.

Notes:

This plugin is part of the Simple Plugins project, but does NOT require the core to function.

Enjoy!

retsam 10-01-2009 18:37

Re: Simple Chat Colors
 
:mrgreen:

thetwistedpanda 10-01-2009 19:04

Re: Simple Chat Colors
 
Just tested this out on CS:S. It seems {teamcolor} doesn't actually display the team color; instead it just displays default. Meaning can't replicate team colored chat with this plugin :O.

Antithasys 10-01-2009 19:10

Re: Simple Chat Colors
 
Quote:

Originally Posted by thetwistedpanda (Post 949573)
Just tested this out on CS:S. It seems {teamcolor} doesn't actually display the team color; instead it just displays default. Meaning can't replicate team colored chat with this plugin :O.

Ya, I have already found that bug. Thought I had it worked out. I will update it in the next 60 mins. Hate quick updates, but expect a 1.0.1 very soon.

thetwistedpanda 10-01-2009 19:11

Re: Simple Chat Colors
 
Thanks; is it possible to replicate the spectator name color (gray)?

*Edit* And also, is it supposed to be not possible to use {red} and {blue} together?

noodleboy347 10-01-2009 19:17

Re: Simple Chat Colors
 
Oh my God I love you.

Antithasys 10-01-2009 19:18

Re: Simple Chat Colors
 
Quote:

Originally Posted by thetwistedpanda (Post 949579)
Thanks; is it possible to replicate the spectator name color (gray)?

*Edit* And also, is it supposed to be not possible to use {red} and {blue} together?

It follows the same rules as the include file. Yes you cannot use two team colors in 1 message. Therefore a name of red and a message of blue (for TF2) would not work.

EDIT:

Give me a few mins, I will have the new version shorty. Almost got it fixed and ready to go.

noodleboy347 10-01-2009 19:27

Re: Simple Chat Colors
 
Does yellow work? I remember it used to show up as black if no one has found an item on the server yet.

thetwistedpanda 10-01-2009 19:45

Re: Simple Chat Colors
 
Quote:

Originally Posted by noodleboy347 (Post 949591)
Does yellow work? I remember it used to show up as black if no one has found an item on the server yet.

Read the link he posted: http://forums.alliedmods.net/showthread.php?t=96831%22

DontWannaName 10-01-2009 19:46

Re: Simple Chat Colors
 
It works but like you said it will appear black to some.

noodleboy347 10-01-2009 19:48

Re: Simple Chat Colors
 
Plugin doesn't work? Or is that what you're fixing?

thetwistedpanda 10-01-2009 19:49

Re: Simple Chat Colors
 
He's fixing a bug where {teamcolor} didn't work correctly; read what he wrote =P (it'll be fixed shortly).

noodleboy347 10-01-2009 19:52

Re: Simple Chat Colors
 
Quote:

Originally Posted by thetwistedpanda (Post 949603)
He's fixing a bug where {teamcolor} didn't work correctly; read what he wrote =P (it'll be fixed shortly).

EDIT: It works, had my STEAMID in wrong, I am a failure.

Antithasys 10-01-2009 20:16

Re: Simple Chat Colors
 
ok, I readded the attachment. I didn't change the version number, and if you have already downloaded it, redownload it.

Minor fixes include fixing {teamcolor} and small log error with hlstatsx.

thetwistedpanda 10-01-2009 20:20

Re: Simple Chat Colors
 
You fixed the issue with red/blue not working in {teamcolor}, but you broke {lightgreen}. Neither of these examples function:

Quote:

"Clan Member"
{
"flag" "t"
"namecolor" "{lightgreen}"
"textcolor" "{green}"
}
Quote:

"Clan Member"
{
"flag" "t"
"namecolor" "{green}"
"textcolor" "{lightgreen}"
}

noodleboy347 10-01-2009 20:32

Re: Simple Chat Colors
 
Quote:

Originally Posted by thetwistedpanda (Post 949620)
Confirmed fixed :).

*edit*

This no longer functions! :(. lightgreen doesn't seem to work period.

I'm using lightgreen and it works fine. Have you reloaded?

thetwistedpanda 10-01-2009 20:32

Re: Simple Chat Colors
 
Of course I reloaded =P, otherwise {teamcolor} would still be broken. Are you using it in CS:S?

Interesting enough, this functions:
Quote:

"Clan Member"
{
"flag" "t"
"namecolor" "{teamcolor}"
"textcolor" "{teamcolor}"
}

Antithasys 10-01-2009 20:41

Re: Simple Chat Colors
 
Ok. There appears to be some errors in the .inc file. :evil:

It has lightgreen set to use \x03 which is a team color. It also has yellow set to \x04 which is green, not the new tf2 yellow/black.

I am not going to publish another update because of these issues right after its release... again. I am going to wait a bit to see what's up with any more errors (if any).

If you want to modify what the names do, you can edit the colors.inc file at:
PHP Code:

new String:CTag[][] = { "{default}""{green}""{yellow}""{lightgreen}""{red}""{blue}""{olive}"};
new 
String:CTagCode[][] = { "\x01""\x04""\x04""\x03""\x03""\x03""\x05"}; 

You would change the second \x04 to \x06 and recompile

I am not sure if there is a lightgreen in CSS, his chart in his thread doesn't seem to include everything or be 100% accurate.

thetwistedpanda 10-01-2009 20:50

Re: Simple Chat Colors
 
I did as you suggested and it made no difference in-game. Also, CS:S does have a light green. I'll fiddle with it and see if I can fix it. It should be mentioned, however, that I have used {lightgreen} in the colors.inc in other plugins and it's worked just fine.

Antithasys 10-01-2009 20:54

Re: Simple Chat Colors
 
Quote:

Originally Posted by thetwistedpanda (Post 949635)
I did as you suggested and it made no difference in-game. Also, CS:S does have a light green. I'll fiddle with it and see if I can fix it. It should be mentioned, however, that I have used {lightgreen} in the colors.inc in other plugins and it's worked just fine.

Then I am not sure why it wouldn't work here. I will look at it further.

EDIT:
The fix above was for TF2 yellow/black

thetwistedpanda 10-01-2009 20:56

Re: Simple Chat Colors
 
Ah. I have another bug for you then. Could you add support for sm_gag / sm_silence? Completely bypasses it, as well as sm_deadtalk.

Antithasys 10-01-2009 21:00

Re: Simple Chat Colors
 
Quote:

Originally Posted by thetwistedpanda (Post 949638)
Ah. I have another bug for you then. Could you add support for sm_gag / sm_silence? Completely bypasses it, as well as sm_deadtalk.

It does a IsChatTrigger() check... and just in case it doesn't find the trigger, it bugs out on: @ ! /

But if it's just a word trigger with no @ ! or / at the start of the message, there is no way to know that it would need to bug out.

thetwistedpanda 10-01-2009 21:01

Re: Simple Chat Colors
 
Sorry I wasn't clear; it allows gagged/silenced players to bypass their punishment O.O.

Antithasys 10-01-2009 21:02

Re: Simple Chat Colors
 
Quote:

Originally Posted by thetwistedpanda (Post 949640)
Sorry I wasn't clear; it allows gagged/silenced players to bypass their punishment O.O.

haha ya ok. I can see that.

EDIT:

That's gonna be a pain to deal with. lol

noodleboy347 10-01-2009 21:03

Re: Simple Chat Colors
 
Why not just make a Simple Gag plugin?

Better than the Sourcemod one, it will tell you when you're gagged. For example, trying to say something when you're gagged tells you you're gagged! :P

noodleboy347 10-01-2009 22:25

Re: Simple Chat Colors
 
Lightgreen stopped working. And it worked before, so SADFAIC

EDIT: Yellow shows up as green, lightgreen doesn't work, I'm back to the first version.

thetwistedpanda 10-01-2009 22:52

Re: Simple Chat Colors
 
Actually, it's not really necessary for you to fix it; You can simply put a warning on the first post warning users that they shouldn't give colors to individuals that may eventually need to be gagged/silenced (i.e. to the general population) =P.

*Edit* Another bug for ya: it seems the player_say event is being fired twice or something, as things are being printed twice in chat (for example, when a user types /rank for hlstatx or sodstats).

noodleboy347 10-01-2009 23:03

Re: Simple Chat Colors
 
Typing "rtd" shows up when it should normally be blocked. I see how it works and it's not that big of a deal. Just a heads up.

Antithasys 10-01-2009 23:08

Re: Simple Chat Colors
 
I have fixed most of the color issues. I was not going to deal with the gag\silence issues anytime soon. I have not been able to repeat the double print. What are you doing to get that?

Antithasys 10-01-2009 23:32

Re: Simple Chat Colors
 
Quote:

(02/10/09): Version 1.0.1
-----------------------
+ Added command sm_printchatcolors to see what the colors do
! Fixed colors getting wrong result
! Fixed spectator chat showing up as dead chat
? Clarified what colors could not be used together in .cfg file

thetwistedpanda 10-01-2009 23:34

Re: Simple Chat Colors
 
Just using the latest stable version of SourceMod, your v1.0.1 plugin, and
PHP Code:

rcon sm plugins info 15
  Filename
gameme.smx
  Title
gameME Plugin (gameME Plugin)
  
AuthorTTS Oetzel Goerz GmbH
  Version
3.0
  URL
http://www.gameme.com
  
Statusrunning
  Reloads
Map Change if Updated
  Timestamp
06/15/2009 22:48:32 

PHP Code:

  01 "Admin File Reader" (1.2.3by AlliedModders LLC
  02 
"Admin Help" (1.2.3by AlliedModders LLC
  03 
"Admin Menu" (1.2.3by AlliedModders LLC
  04 
"Anti-Flood" (1.2.3by AlliedModders LLC
  05 
"Basic Chat" (1.2.3by AlliedModders LLC
  06 
"Basic Comm Control" (1.2.3by AlliedModders LLC
  07 
"Basic Commands" (1.2.1by AlliedModders LLC
  08 
"Basic Info Triggers" (1.2.3by AlliedModders LLC
  09 
"Basic Votes" (1.2.3by AlliedModders LLC
  10 
"Client Preferences" (1.2.3by AlliedModders LLC
  11 
"{HoM} Admin Core" (1.0by Panda USAF
  12 
"{HoM} Core Configuration" (0.1by Panda USAF
  13 
"Fun Commands" (1.2.3by AlliedModders LLC
  14 
"Fun Votes" (1.2.3by AlliedModders LLC
  15 
"gameME Plugin" (3.0by TTS Oetzel Goerz GmbH
  16 
"Kigen's Anti-Cheat" (1.2.0.0by Kigen
  17 
"{HoM} Knife Fight" (2.0by Panda USAF
  18 
"MapChooser" (1.2.3by AlliedModders LLC
  19 
"{HoM} Nade Spam" (2.0by Panda USAF
  20 
"Nextmap" (1.2.3by AlliedModders LLC
  21 
"NoBlock" (1.2.0by Otstrel.ru Team
  22 
"Map Nominations" (1.2.3by AlliedModders LLC
  23 
"Player Commands" (1.2.3by AlliedModders LLC
  24 
"{HoM} Spawn Protection" (2.0by Panda USAF
  25 
"{HoM} Quick Defuse" (1.0by pRED*, Panda USAF
  26 
"Radio Spam Block" (1.0.0by exvel
  27 
"RCON Lock" (0.3.3by devicenull
  28 
"Reserved Slots" (1.2.3by AlliedModders LLC
  29 
"Weapon Restrictions" (3.0.2by Liam
  30 
"Rock The Vote" (1.2.3by AlliedModders LLC
  31 
"{HoM} Server Rules" (1.0by haNPanda USAF
  32 
"Save Scores" (1.3.1by exvel
  33 
"{HoM} !Buy Command" (1.0by Panda USAF
  34 
"{HoM} Server Redirect" (1.1by BrainstormPanda USAF
  35 
"silencenades" (1.1by grif_ssa
  36 
"Advertisements from Database" (1.2.100by Tsunami and <eVa>Dog
  37 
"Sound Commands" (1.2.1by AlliedModders LLC
  38 
"SourceBans" (1.4.3by InterWave Studios Development Team
  39 
"Spray Tracer" (5.8by Nican132CptMooreLebson506th
  40 
"Team Bets" (2.2by GrimReaper Original by ferret
  41 
"{HoM} Swap Team" (1.0by Panda USAF
  42 
"{HoM} Team Balance" (2.0by daltoPanda USAF
  43 
"Quake Sounds" (2.7by daltoGrrrrrrrrrrrrrrrrrrr, and psychonic
  44 
"Goremod" (4.1.1by Joe 'Pinkfairie' Maley
  45 
"Dissolve" (1.0.0.1by LDuke 

If you can't reproduce the error I guess i'll boot up a dev server and try plugins one at a time.

Antithasys 10-01-2009 23:39

Re: Simple Chat Colors
 
Quote:

Originally Posted by thetwistedpanda (Post 949720)
If you can't reproduce the error I guess i'll boot up a dev server and try plugins one at a time.

I am testing on a 1.3.x server (latest build I think) with nothing but base plugins. It works as intended and I do not get a double print.

thetwistedpanda 10-01-2009 23:40

Re: Simple Chat Colors
 
Alright I'll get back to you shortly with my results

Xp3r7 10-01-2009 23:46

Re: Simple Chat Colors
 
Anyway to set admin chat color when and only when they use the "@" symbol for admin chat to all?

Antithasys 10-01-2009 23:55

Re: Simple Chat Colors
 
Quote:

Originally Posted by Xp3r7 (Post 949731)
Anyway to set admin chat color when and only when they use the "@" symbol for admin chat to all?

No. It bugs out on @

thetwistedpanda 10-01-2009 23:57

Re: Simple Chat Colors
 
Alright I loaded up an installation of 1.2.3 with base sourcemod plug-ins and the hlstatsx plugin and it still produces a double event for when users type "place" or "kdeath" in chat (the triggers that put information into chat). It doesn't do a double print on anything afaik, so it's an incompatibility between these two.

Antithasys 10-02-2009 00:03

Re: Simple Chat Colors
 
Quote:

Originally Posted by thetwistedpanda (Post 949740)
Alright I loaded up an installation of 1.2.3 with base sourcemod plug-ins and the hlstatsx plugin and it still produces a double event for when users type "place" or "kdeath" in chat (the triggers that put information into chat). It doesn't do a double print on anything afaik, so it's an incompatibility between these two.

I see what you mean. The last explination was clear. HLstatsxCE is prining the result of "place", or any other public command that results in a chat response, twice. Is that what you mean?

thetwistedpanda 10-02-2009 00:06

Re: Simple Chat Colors
 
Yes; sorry, explanations plus alcohol is usually a bad combination. I've found another bug for you: If a player is dead their chat either shows up as (SPEC) or not at all.

Antithasys 10-02-2009 00:08

Re: Simple Chat Colors
 
Quote:

Originally Posted by thetwistedpanda (Post 949749)
Yes; sorry, explanations plus alcohol is usually a bad combination. I've found another bug for you: If a player is dead their chat either shows up as (SPEC) or not at all.

doh

replace line 499:
PHP Code:

else if (iTeam != 1


exvel 10-02-2009 00:13

Re: Simple Chat Colors
 
Quote:

Ok. There appears to be some errors in the .inc file.

It has lightgreen set to use \x03 which is a team color.
Actually lightgreen is a team color. It is server's team color when message author is client = 0. Don't know about TF but this is true for all other Source games. This was mentioned in the description. It is impossible to use red, blue or lightgreen together.

Quote:

It also has yellow set to \x04 which is green, not the new tf2 yellow/black
Yeap, this inc was created before this TF items updates were released. Just place:
PHP Code:

CTagCode[][] = {"\x01""\x06""\x06""\x03""\x03""\x03""\x05"}; 

in the profile section for TF. It will work differently just for TF then. These arrays was designed in a way that they can be changed after detection of game name.

Also {yellow} is just an alias for {green} (useful for L4D where \x04 = yellow).

I'll test \x06 color later and release an update for colors.inc for TF.


All times are GMT -4. The time now is 19:51.

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