Catch some chat-messages
-
Hello,
is it possible to catch some chat-messages typed by the player?
For example:
Player types: “Hello”, is sent to the server
Player types: “!SomeCommand”, is not sent to the server, but a C+±method is calledIf someone has some freetime
Thanks -
Yes, it’s possible, but if you want to catch this before it’s sent to the server, you’ll need to ask someone who knows about client hooking. (They keep client hooking in the trusted devs section which only a few people can see.)
-
There are a many client-hook-plugins in this forum, I think this one doesn’t count, because you can’t really chat with it =D
So if someone finds some time, I would be happy -
Look at Adoxa’s chatlog.c file. It’s got hooks for chatting, and new/departing players. Problem is, I don’t know if there’s a way to catch messages before they are sent.
-
It depends what you want. If you don’t want to output anything, it’s reasonably simple. If you do want to output something, that’s a little trickier. In either case, text can be retrieved via hooking Enter ([0x45f828]) and either using the data directly (std::vector at esi+0x4c4) or calling a function to copy it (__thiscall 0x57c2c0( wchar_t*, int )). If you don’t want to output anything, just return via the Escape function at [0x45f82c]. If you do want to output something, perhaps you could return via Escape and call 0x46a150 directly. If that doesn’t work, you could modify the chat to send “/echo whatever” (via a std::wstring, but I didn’t investigate the exact process to find it; it’s a TextNode from a list at [esi+0x4ec], I think). References: Console and External Message.
-
Okay, I will try it. Thanks!
-
Question about the chatlog.dll
Ok, I ran into quite a few issues
1. Trying to run it with FLShell seems to not work no matter what order I load the DLL in
2. Instructions are wrong. It needs to be listed in dacomsrv.ini
3. It overwrites the ingamechat.txt file instead of appending to it on each run - so I get one line that has the Freelancer started then… nothing. Even stopping the server does not show Freelancer stopped.I can get VC6 - Should I recompile from source or is there an updated adoxa version out there I can use?
EDIT: Oh, and taking out the flshell.dll from the list? No go. chatlog still doesn’t log squat.
-
Errr… Chatlog is a CLIENT plugin. That’s why it goes into dacom.ini in the first place.
-
Urgh! facepalms at self
But in all seriousness, client-side logging - not helpful for me here.
When I ran the Phoenix server I had some issues with players who allegedly were falsifying allegations of being cussed out and sworn at but there were no logs - no screenshots - only some FLShell login and logout logs that might have proven the people in question were lying.
Snoopy server admin wants to avoid this next time.
-
Yeah well you won’t be able to do that with FLShell. Nobody’s developed plugins for the thing as far as I know.
There are chat log plugins for FLHook, but not for FLShell.
-
I’ll probably switch to FLHook for the next iteration of the server if FLHook will take FLShell restart templates without issue.