[Dragonade] Enabling Private Chat [message #492581] |
Wed, 11 October 2017 13:17 ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
Neijwiert
Messages: 124 Registered: October 2009
Karma: 0
|
Recruit |
|
|
This plugin is now obsolete. Since WhiteDragon does not update Dragonade anymore, I've decided to memory patch the da.dll instead. The included da.dll is exactly the same as the original da.dll v1.9 except it has 4 bytes NOP-ed out that are responsible for blocking private chat. I've created this so that people stop asking me about an update.
For those people wondering: I'm not actively back yet, I'm still busy with my graduation.
EDIT: Don't worry you can just copy this dll over any 'later Dragonade versions'. Every version after and including v1.9 that dBlaney has released has an unchanged da.dll.
-
Attachment: da.dll
(Size: 35.50KB, Downloaded 88 times)
[Updated on: Fri, 22 June 2018 07:25] Report message to a moderator
|
|
|
|
Re: [SSGM 4.5 Plugin] PrivateChatHookPlugin [message #492583 is a reply to message #492582] |
Thu, 12 October 2017 11:22 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
Neijwiert
Messages: 124 Registered: October 2009
Karma: 0
|
Recruit |
|
|
PGS-PC wrote on Thu, 12 October 2017 08:07 | Doesn't work with DA. Only shows when you PM yourself and not others.
|
Hmm I need someone to test this with then. Admitted, I did only test this while pming myself. i assumed that to others would work as well.
|
|
|
Re: [SSGM 4.5 Plugin] PrivateChatHookPlugin [message #492584 is a reply to message #492581] |
Thu, 12 October 2017 14:30 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
Neijwiert
Messages: 124 Registered: October 2009
Karma: 0
|
Recruit |
|
|
Ok I now see what's going on. Without Dragonade this plugin works just fine. Apparently Dragonade does some stuff with the messaging in da.dll. Need to hook that shit too in case of dragonade and then call the dragonade chat event i guess?
|
|
|
Re: [SSGM 4.5 Plugin] PrivateChatHookPlugin [message #492585 is a reply to message #492581] |
Thu, 12 October 2017 15:08 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
Neijwiert
Messages: 124 Registered: October 2009
Karma: 0
|
Recruit |
|
|
Well I know how to 'fix' it, correct me if I'm wrong, but seeing the source code of Dragonade kind of tells me that all legacy SSGM plugins already receive private messages in the OnChat event when Dragonade is running. So you'd only need this plugin when Dragonade is not running on the server and you want to see private chat.
EDIT: Ignore what I've said it doesn't...
if ( receiverPlayerClass && (PlayerID != receiverID_1 || (unsigned __int8)DAEventManager::Chat_Event(v5, 2, v15, receiverID_1)) )
I will make the fix...
[Updated on: Thu, 12 October 2017 15:13] Report message to a moderator
|
|
|
Re: [SSGM 4.5 Plugin] PrivateChatHookPlugin [message #492586 is a reply to message #492581] |
Fri, 13 October 2017 04:50 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
Neijwiert
Messages: 124 Registered: October 2009
Karma: 0
|
Recruit |
|
|
Ok so here's the thing. I updated it to work with both SSGM and Dragonade at the same time. It will detect Dragonade and will then perform the appropriate steps. But the funny thing is I discovered this weird 'glitch' where in normal 'vanilla' fds it would output the private message twice. Well turns out this isn't a glitch and vanilla fds 4.5 just puts all private messages through.
@JonWil I don't know if this is a mistake on your side, but if it is, you should take a look at the function at address 0x1217D3D0 at the bottom. You forgot to check if the message type is of type TEXT_MESSAGE_PRIVATE
I updated the dll, re-download if you had the previous version. Still update even though you didn't use Dragonade. I also fixed some bugs.
EDIT:
In fact I'm pretty sure its a mistake. SSGM can't even handle private chat:
SSGMGameLog::Log_Gamelog("CHAT;%s;%d;%ls", type, Commands->Get_ID(player), Message);
Where type = char type[8];
It is never initialized, so this is a serious bug.
[Updated on: Fri, 13 October 2017 05:20] Report message to a moderator
|
|
|
Re: [SSGM 4.5 Plugin] PrivateChatHookPlugin [message #492587 is a reply to message #492581] |
Fri, 13 October 2017 06:36 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
|
Because our build infrastructure and symbol server is down, I have no way to know what function that address matches to so I cant see what its doing, why its doing it or who made it do what its doing.
Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
|
|
|
Re: [SSGM 4.5 Plugin] PrivateChatHookPlugin [message #492588 is a reply to message #492581] |
Fri, 13 October 2017 06:40 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
|
Actually after checking the chat hook code a bit, it looks like it was WhiteDragon who was responsible for removing the private message check although I have no clue why he did it (it happened as part of his work to make all those hooks support multiple instances and its unclear if it was intentional or if it was unintentional)
Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
|
|
|
|
|
Re: [SSGM 4.5 Plugin] PrivateChatHookPlugin [message #492594 is a reply to message #492581] |
Fri, 13 October 2017 10:57 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
shaitan
Messages: 727 Registered: April 2005 Location: Pennsylvania
Karma: 0
|
Colonel |
|
|
It was removed this whole time because of that reasoning? That makes sense now, prior to DA we were able to turn that on or off. If you remember Blacky, you had your own working brenbot version you'd added too.
That was always a moderator tool that in extreme circumstances came in handy. There's PM abuse that goes on and unless someone has their own proof...we can't deal with it. There's been shitloads of times that would've come in handy to turn on for 2 players.
Are any of you able to bypass that particular section so it works again?
Aircraftkiller wrote on Sun, 18 Jan 2004 07:38 | I get along with people fine, so long as they aren't rejects who promised things that they couldn't
deliver on, or forum trolls who contribute nothing except to bloat the fragile egos of the same
rejects I despise.
|
|
|
|
Re: [SSGM 4.5 Plugin] PrivateChatHookPlugin [message #492595 is a reply to message #492581] |
Fri, 13 October 2017 12:11 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
Neijwiert
Messages: 124 Registered: October 2009
Karma: 0
|
Recruit |
|
|
Either way something needs to be done. SSGM cant handle the private chat and it probably reads beyond the buffer. It is really weird that Dragonade is less free in capabilities than vanilla imo. So what is it going to be now allowed or not allowed?
|
|
|
Re: [SSGM 4.5 Plugin] PrivateChatHookPlugin [message #492597 is a reply to message #492581] |
Fri, 13 October 2017 12:25 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
shaitan
Messages: 727 Registered: April 2005 Location: Pennsylvania
Karma: 0
|
Colonel |
|
|
Right now the whole thing is moot, rencorner DA is on 4.3 scripts still.
Yes, I'd like to be able to have that as a functionality.
It can be done different ways at showing up: logs, console, secret channel, turn on/off per players as I mentioned.
Aircraftkiller wrote on Sun, 18 Jan 2004 07:38 | I get along with people fine, so long as they aren't rejects who promised things that they couldn't
deliver on, or forum trolls who contribute nothing except to bloat the fragile egos of the same
rejects I despise.
|
|
|
|
|
Re: [SSGM 4.5 Plugin] PrivateChatHookPlugin [message #492599 is a reply to message #492581] |
Fri, 13 October 2017 13:32 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
Neijwiert
Messages: 124 Registered: October 2009
Karma: 0
|
Recruit |
|
|
Updated plugin. It now does version checking. Compatible with stock/vanilla 4.3/4.4/4.5 and DA 1.9/1.92
Added new option in SSGM.ini/da.ini
LogEveryone = 1
Set LogEveryone to true to log everyone, else log everybody flagged with the PCH command, see below:
New console command PCH <clientId> - Enables or disables private chat logging for client (ignored when LogEveryone is set to 1)
Redownload to take effect, obviously...
|
|
|
Re: [SSGM 4.3/4.4/4.5 | DA 1.9/1.92 Plugin] PrivateChatHookPlugin [message #492600 is a reply to message #492581] |
Fri, 13 October 2017 16:06 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
shaitan
Messages: 727 Registered: April 2005 Location: Pennsylvania
Karma: 0
|
Colonel |
|
|
That sneaky bugger, I'd made a copy of it last week for testing, it was 4.3.
Aircraftkiller wrote on Sun, 18 Jan 2004 07:38 | I get along with people fine, so long as they aren't rejects who promised things that they couldn't
deliver on, or forum trolls who contribute nothing except to bloat the fragile egos of the same
rejects I despise.
|
|
|
|
|
Re: [SSGM 4.2.4/4.3/4.4/4.5 | DA 1.8.1/1.9/1.92 Plugin] PrivateChatHookPlugin [message #492603 is a reply to message #492581] |
Sat, 14 October 2017 11:20 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
Neijwiert
Messages: 124 Registered: October 2009
Karma: 0
|
Recruit |
|
|
Previous version was completely broken and I somehow did not notice that in my tests. Updates plugin to work correctly with version checking and it is now compatible with vanilla/stock TT 4.2.4 and Dragonade 1.8.1.
Also added 2 new ini settings: ChatEventAddress and ChatHookEventVectorAddress.
Do not add these to your ini or set them to anything other than 0 unless you know what you're doing.
Also added functionality to PCH command: pch all. Will print out all players currently being logged when used with pch <playerId>.
@JonWil it seems that the transition from TT v4.2.4 to 4.3 removed the TEXT_MESSAGE_PRIVATE check.
Redownload in original post.
EDIT: Ignore last minute bug found. Download removed until fixed, don't have time now.
EDIT 2: Fixed.
[Updated on: Sat, 14 October 2017 11:39] Report message to a moderator
|
|
|
|
|
Re: [SSGM 4.2.4/4.3/4.4/4.5 | DA 1.8.1/1.9/1.92 Plugin] PrivateChatHookPlugin [message #492607 is a reply to message #492581] |
Tue, 17 October 2017 15:20 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
shaitan
Messages: 727 Registered: April 2005 Location: Pennsylvania
Karma: 0
|
Colonel |
|
|
[17:06:21] PrivateChatHookPlugin: Failed to version check
I only see that in the renlog, nothing shows in the console with pages. It shows the people in the pchall, you can add/remove, but that's it.
Current settings: [PrivateChatHookPlugin]
ShowPrivateChatInConsole=1
LogEveryone=1
I've tried setting it to 0 and 1, same thing of not showing pages. It's in ssgm.ini, da.ini and our other just to see if any would work.
It's your latest download link in the top post.
Aircraftkiller wrote on Sun, 18 Jan 2004 07:38 | I get along with people fine, so long as they aren't rejects who promised things that they couldn't
deliver on, or forum trolls who contribute nothing except to bloat the fragile egos of the same
rejects I despise.
|
[Updated on: Tue, 17 October 2017 15:21] Report message to a moderator
|
|
|
|
Re: [SSGM 4.2.4/4.3/4.4/4.5 | DA 1.8.1/1.9/1.92 Plugin] PrivateChatHookPlugin [message #492609 is a reply to message #492581] |
Wed, 18 October 2017 07:41 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
Neijwiert
Messages: 124 Registered: October 2009
Karma: 0
|
Recruit |
|
|
Some information when you are running a custom Scripts.dll for either Stock or Dragonade:
You will need to manually enter the address in ssgm.ini/da.ini for the ChatHookEventVectorAddress variable.
How do I get this address if I don't have any knowledge about reverse engineering:
- Stock
Add these lines anywhere in SSGMGameManager::Init
DWORD_PTR moduleBase = reinterpret_cast<DWORD_PTR>(GetModuleHandleW(NULL));
DWORD_PTR registeredEventsEventChatHookCountOffset = reinterpret_cast<DWORD_PTR>(&(RegisteredEvents[EVENT_CHAT_HOOK])) - moduleBase;
Console_Output("Chat Event Hook Address: %d\n", static_cast<int>(registeredEventsEventChatHookCountOffset));
- Dragonade
Add these lines anywhere in DAEventManager::Init
DWORD_PTR moduleBase = reinterpret_cast<DWORD_PTR>(GetModuleHandleW(NULL));
DWORD_PTR registeredEventsEventChatHookCountOffset = reinterpret_cast<DWORD_PTR>(&(Events[DAEvent::CHAT])) - moduleBase;
Console_Output("Chat Event Hook Address: %d\n", static_cast<int>(registeredEventsEventChatHookCountOffset));
Whatever it outputs put it in ssgm.ini/da.ini at ChatHookEventVectorAddress
Now last step: If you're running an older version than TT 4.3 (so not including 4.3) and you're NOT running Dragonade set VanillaHasPrivateChatCheck=1 in ssgm.ini
Redownload latest file, I fixed an issue with it not using the address specified in ssgm.ini/da.ini
|
|
|
|
Re: [SSGM 4.2.4/4.3/4.4/4.5 | DA 1.8.1/1.9/1.92 Plugin] PrivateChatHookPlugin [message #492622 is a reply to message #492581] |
Sat, 28 October 2017 00:41 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to previous message](/theme/Renegade_Forums/images/down.png) |
![](http://renegadeforums.com/images/avatars/Viseroid.jpg) |
Gen_Blacky
Messages: 3250 Registered: September 2006
Karma: 1
|
General (3 Stars) |
|
|
For those that use brenbot here is a support plugin. I made sure it was compatible with brenbot 1.53.
Throw this in the brenbot plugins folder. And use !plugin_load PrivateChatHookPlugin in the admin channel.
Used to only log private messages that mods have a reason to monitor.
This plugin will remember players added with the !pch command and stores them in a database. Matches name or ip on join.
Outputs private messages to irc admin channel or private channel.
Usage !pch <command> <player> | ALL, ADD, REMOVE, DEL, LIST
Command ALL capture renlog output of PCHALL
Command ADD add ingame player to database and use PCHADD
Command REMOVE del ingame player from database and use PCREMOVE
Command DEL is used to delete a player from the database.
Command LIST is used to list everyone in the database
Intended to be used with LogEveryone off.
[PrivateChatHookPlugin]
ShowPrivateChatInConsole=0
LogEveryone=0
ChatEventAddress=0
ChatHookEventVectorAddress=0
VanillaHasPrivateChatCheck=0
@Neijwiert
It would be better if you sent the player id instead of the object id in the CHAT gamelog. At least the way that brenbot 1.53 works, If the bot started while the server is running the bot will not know about an existing player object id until they die.
![http://s18.postimage.org/jc6qbn4k9/bricks3.png](http://s18.postimage.org/jc6qbn4k9/bricks3.png)
[Updated on: Sat, 28 October 2017 01:16] Report message to a moderator
|
|
|