Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

[DEV] Cider Chat Processor


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
Cider Chat Processor

Just another SayText2 hook and forward plugin. The reason this exists is primiarily because I've had so many issues with the other chat processors availalbe. I needed something that could also change the recipients before any other plugin added chat colors etc, and manage dead chat properly. Also needed it to disable say_team theroritically, so the other team can see it (without the prefix of (TEAM)).

This plugin contains a few bug fixes that other processors do not contain that should prevent any exploits of players adding colors to their chat without help from a server plugin.

This is pretty much a simpler version of r3dw3r3w0lf's Chat Processor plugin, I've been sitting on this for a few years now and figured since I finished my own chat plugin I'll need to release this also.

This plugin is just a forwarder and will strip all unicode characters < 17 (except the terminator) from the name and message. This also doesn't use random crap includes like color variables, why the hell would a SayText2 forwarder need to assign colors anyways, that's the job for the plugin that it's forwarding to... /rant

Keep in mind this was created with TF2 testing, I only did minimal testing on csgo and haven't tried some of the changes I've pushed recently.

Server Operator ConVar Config
Code:

//Enable Cider Chat Processor
sm_ccp_enable "1" 

//Name of the message formats config, incase you have some where else you want to put this?
sm_ccp_config "configs/chat_processor.cfg"

//Dead chat is seen by alive players.
// (WARNING) a module plugin can use CCP_OnChatMessagePre or CCP_OnChatMessage to change the array of recipients.
sm_ccp_deadchat "1"   

//Team chat isn't seen by other team
// 0 - Disabled, say_team isn't converted to All Chat.
// 1 - No Filter, all team's say_team is converted to All Chat.
// 2 - Team 2's chat is converted to All Chat.
// 3 - Team 3's chat is converted to All Chat.
sm_ccp_teamchat "0"

Developer Forwards
Code:

/**
* Called before CCP_OnChatMessage, useful to check the author and stop the message or change whose in the recipients ArrayList.
* flagstring can also be changed to make the message appear from an alive person etc.
* recipients contains userIds, by default it is filled matching the processors config file.
**/
forward Action CCP_OnChatMessagePre(int& author, ArrayList recipients, char[] flagstring);

/**
* Called while sending a chat message before It's sent to all recipients.
* This is where a chat manager plugin can change the name and message to add colors etc.
* Changing author to -1 will make {03} purple instead of team color (On CS:GO engine).
**/
forward Action CCP_OnChatMessage(int& author, ArrayList recipients, char[] flagstring, char[] name, char[] message);

/**
* Called after the chat message is sent to the designated clients by the author.
**/
forward void CCP_OnChatMessagePost(int author, ArrayList recipients, const char[] flagstring, const char[] formatstring, const char[] name, const char[] message);

Releases (Plugin)
GitHub (Source)

Wyświetl pełny artykuł

Odnośnik do komentarza
Udostępnij na innych stronach

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.

Zarejestruj nowe konto

Załóż nowe konto. To bardzo proste!

Zarejestruj się

Zaloguj się

Posiadasz już konto? Zaloguj się poniżej.

Zaloguj się
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...