OpenPerpetuum / PerpetuumServer

The Open Perpetuum Project's fork of the Perpetuum Standalone Server
https://openperpetuum.com
Other
44 stars 21 forks source link

Logging - Chat Commands (#315) #396

Closed Ghroom closed 1 year ago

Ghroom commented 3 years ago

Added the basics of logging chat commands. enhancement must be done later. I also refactored some functions to check if it's an admin or if it's a command. (It was useless to check both when cheking if it's a chat command)

Pull request also present in the OPDB part for the creation of the log table.

Ghroom commented 3 years ago

Btw, I also added the fact that, if you are not an admin, I dont display the command in chat.

MikeJeffers commented 3 years ago

Maybe this is a hot-take, but I think we would only care about commands that are executed upon no? We have chat logs, but what would be easier to track and query are the commands that are executed and by whom.

In fact I think it would be easier to blow up DB rows if everyone who attempted a command got logged into a table. I'd rather have an easier table to query for the commands that are run, and leave the chat logs for all the failed attempts and typos (of which there will be many)