AlliedModders

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

Antithasys 09-20-2011 13:04

Simple Chat Processor
 
6 Attachment(s)
Simple Chat Processor

Description:
Provides global forward for chat messages allowing other plugins to manipulate the display of chat messages.
Currently this only supports SayText2 usermessage.
Console Variables:
None.
Installation:
Place the simple-chatprocessor.smx in the /sourcemod/plugins dir.
Place the appropriate phrases file in the /sourcemod/translations dir.
Changelog:

Quote:

1.0.1
! Fixed memory leak on no action

1.0.0
Release
Include File

PHP Code:

/**********************************************************************
 * When a player types a chat message
 *
 * NOTES:
 * Use MAXLENGTH_  constants above for formating the strings
 * Do not rely on the recipients handle to exist beyond the forward
 * Do not start another usermessage (PrintToChat) within this forward
 *
 * @param         author        The client index of the player who sent the chat message (Byref)
 * @param         recipients    The handle to the client index adt array of the players who should recieve the chat message
 * @param         name          The client's name of the player who sent the chat message (Byref)
 * @param         message       The contents of the chat message (Byref)
 * @noreturn
 **********************************************************************/
forward Action:OnChatMessage(&authorHandle:recipientsString:name[], String:message[]);



/**********************************************************************
 * Gets the current flags for the chat message
 * Should only be called within OnChatMessage()
 *
 * @return        The current type of chat message (see constants) 
 **********************************************************************/
 
native GetMessageFlags(); 

Notes:

This plugin by itself does nothing. This plugin is the core plugin for the following other plugins:

Simple Chat Colors
Simple Chat Filter
Simple Chat Responses
Simple Chat All Dead
Simple Chat Me

If you want to use any of the above plugins you will need this plugin as well.
Of course, anyone else is free to use this for their own plugins too!

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 | Include | Plugin | No Config | Phrases

Enjoy!

Antithasys 09-20-2011 13:05

Re: Simple Chat Processor
 
Reserved.

micazoid 09-21-2011 12:22

Re: Simple Chat Processor
 
Will this work for Day of Defeat Source also?

I am asking because there is no translation file for dods

EDIT: OkeylyDokely

It will not work

Quote:

18:24:40 [simple-chatprocessor.smx] [SCP] Recognized mod [Day Of Defeat].
18:24:40 [simple-chatprocessor.smx] [SCP] Translation file is not present
18:24:40 [SM] Plugin encountered error 25: Call was aborted
18:24:40 [SM] Native "SetFailState" reported: Translation file is not present
18:24:40 [SM] Displaying call stack trace for plugin "simple-chatprocessor.smx":
18:24:40 [SM] [0] Line 140, /home/groups/alliedmodders/forums/files/3/6/9/5/4/92887.attach::OnPluginStart()


Antithasys 09-21-2011 12:29

Re: Simple Chat Processor
 
The short answer... no.

Unfortunately DOD:S doesn't support saytext2. I was going to add saytext but it didn't seem like a helpful option, since it could cause more problems than it solves. DOD:S does the translation very differently than the other OB games, and colors are determined by engine itself.

micazoid 09-21-2011 12:35

Re: Simple Chat Processor
 
hm thats not good :(

Is there any chance, that the Tag functions of simple chat colors may work somehow?

Antithasys 09-21-2011 12:46

Re: Simple Chat Processor
 
Quote:

Originally Posted by micazoid (Post 1560283)
hm thats not good :(

Is there any chance, that the Tag functions of simple chat colors may work somehow?

I have not seen, nor could I find, an SDK for DOD:S that shows how the client functions process the saytext usermessage. I also do not have a server to test variations against. If you want to offer your help, I can try to do something, but it would require some back and forth.

EDIT:

The SDK's here are for OB, which includes DOD:S, but for some reason the client hud is not processed as this SDK would indicate.

micazoid 09-21-2011 12:56

Re: Simple Chat Processor
 
I am not a programmer. The only help I can offer is:

First this

And a server for testing.

BTW:
I am not looking for chatcolors. The only thing I am looking for is to give certain admingroups certain tags (and maybe colors XD ). I have in mind to set up a VIPsystem, with different ClanTags.
This Plugin does have a "automatic add a Tag"-function but only for one group of admins.

Maybe I can do more to help, that I cant see atm.
Just ask, I will help werever I can to do this.

Antithasys 09-21-2011 13:13

Re: Simple Chat Processor
 
Since you are not really looking to have this processor support DOD:S I think the correct line of action for you is to get that plugin you linked to work in the manner you want. Maybe post it in Plugin Requests and a description of how you want it modified. This is really just a processor to supply forwards, and all I could do here is support saytext, and like I said, that is problematic.

micazoid 09-21-2011 13:21

Re: Simple Chat Processor
 
oki. Thank you.

And there is no chance, that you can rip the Tagfunctionality out of that=

I do not want to get on your nerves, I am just thinking, that the code is already there :)

If not, then I will request this.

Thanks for your fast replies. And I almost forgot. Good work. This is very interesting stuff you wrote there

adrianman 09-23-2011 04:49

Re: Simple Chat Processor
 
the l4d translation files are named incorrectly if you get the game folder name,should be left4dead instead of l4d and left4dead2 instead of l4d2


All times are GMT -4. The time now is 13:11.

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