cheahjs / TerrariaAPI-Server

Fork is now over at https://github.com/NyxStudios/TerrariaAPI-Server
https://tshock.co
32 stars 24 forks source link

Remove condition which was short-circuiting the ClientChat hook. #51

Closed Ijwu closed 9 years ago

Ijwu commented 9 years ago

I cannot tell why the condition was present, but it essentially made the ClientChat hook entirely useless and completely blocked its invocation.

Olink commented 9 years ago

Interesting, certainly looks like bad copy pasta. Have you confirmed that the GetData equivalent to this also needs the netmode check as well?

Additionally, do you think it is relevant to add Color and the player receiving the chat to the event args, so that it is the same as the GetData version?

Ijwu commented 9 years ago

After some deliberation, I've come to the conclusion that this hook should probably be removed. At first I was confused about the netMode check but now I realize it's probably just legacy client code or something from another time.

When it was ported to the new hook management system by CoderCow it was likely just a straight port by them without much thought put into it.

I'm closing this PR in favor of finding a better solution.