Raised This Month: $32 Target: $400
 8% 

Strange chat bug I've had for a while


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
EmmJuan
New Member
Join Date: Feb 2019
Old 02-16-2019 , 23:15   Strange chat bug I've had for a while
Reply With Quote #1

I've tried for a long time to fix this problem. On occasion, chat will "duplicate", meaning the message someone sends will send multiple times. Through testing with this bug, I have discovered that it is client side, so the number of times it is duplicated or if it is even duplicated will vary, and I know it has something to do with my chat processor.

Processor: Simple chat processor (I also use custom chat colors)
I've tried using the updated "chat processor" version but it doesnt show text to the sender so I had to botch that

I can't find any other cases of this happening online
EmmJuan is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 02-17-2019 , 01:17   Re: Strange chat bug I've had for a while
Reply With Quote #2

If I remember correctly, the problem affects any forwards that modify the recipients of the message. The issue is that the game sends individual SayText2 messages for each recipient instead of sending one message that covers all recipients. In that case, each forward adds recipients that may be present in other messages in the batch, leading to duplication.

I wrote my own drop-in implementation of Simple Chat Processor that aggregates all similar messages sent within the same tick and has the correct recipient list here.

The catch is, it uses the client's translation strings, which doesn't support message colorization; the translation has to be performed server-side for colors to work. I also don't care much about adding support for it myself since I wrote the plugin for my own server (which doesn't use chat colors).

If you (or any other developers) want to add colorization support and want to maintain it, all you need to do is load in a set of translations (or better, one that covers more languages than just English) and replace the SayText with a loop that sends server-localized messages to the appropriate players. Oh, and tweak the TF2-specific check on line 111.
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)

Last edited by nosoop; 02-17-2019 at 01:56.
nosoop 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 19:49.


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