Pure-Battlefield / gswat

The Pure Game Server Web Administration Tool
Other
2 stars 5 forks source link

Add admin say/yell messages to chat history #12

Closed wbbarr closed 11 years ago

wbbarr commented 11 years ago

We previously believed that it is impossible to see other admin say/yell commands from other RCON clients. This is false; there is likely another event that is triggered on admin chats. We need to find this event and also put it in the server chat history that is displayed, with the optional toggle specified in the spec for Track 1A1.

Assigned to Matt for investigation.

sichinumi commented 11 years ago

For reference, I've observed that "Server" messages are being successfully read currently (example: "Thanks to our donors..." etc). These messages are currently being filtered out in Core, as they are duplicated dozens of times for each player and clog up the feed. Unsure about admin-driven say/yell commands, though - did not get to test.

wbbarr commented 11 years ago

Ok. So as for those being filtered out, we need to filter those down to one copy of each message, then display if the "Show Server Messages" toggle is on.

sichinumi commented 11 years ago

One copy of each message is not quite as easy as it sounds - the server seems to send these messages at differing intervals to each player, with bursts getting sent at one time. Also, the "channel" of the messages (normally ALL/TEAM/SQUAD) is "PLAYER" for each one. The messages are indeed being duplicated, but not on regular intervals from the server's perspective - rather, on regular intervals from the players' perspectives.

Edit: To clarify, none of the above applies to admin say/yell messages - only server text messages. Admin say/yell has not been tested.

mamidon commented 11 years ago

Taking ownership. Right now I know that you can conduct an admin say or yell with certain commands ('admin.say' and 'admin.yell'). I don't see any specific events for them, however player.onChat might be that event (it already is used for when the server makes annoucements -- see the player source field).

I'll investigate this and report back.

wbbarr commented 11 years ago

@maretard, what do you mean "only server text messages"? Aren't admin say/yell server text messages?

sichinumi commented 11 years ago

I'm not sure. The only messages I've seen are "Server: Thanks to our donors... etc" messages, I've never witnessed an admin personally say anything. Not sure if those are two different things.

mamidon commented 11 years ago

admin.say generates a player.onchat event from the server.
I'm still investigating admin.yell.

sichinumi commented 11 years ago

Resolved as of commit f9f1907acb4dfd22785d08a46e089fc6a06221b9