mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-11 15:58:36 +00:00
[Bug Fix] Fix Silent Saylinks Sending Message to Others. (#2389)
* [Bug Fix] Fix Silent Saylinks Sending Message to Others. Silent saylinks wouldn't send to sender, but to everyone else, so they could see what your saylinks were. Added an optional `is_silent` bool to ChannelMessageReceived to account for this where necessary. * Nullptr fix.
This commit is contained in:
+5
-2
@@ -830,7 +830,7 @@ void Client::FastQueuePacket(EQApplicationPacket** app, bool ack_req, CLIENT_CON
|
||||
return;
|
||||
}
|
||||
|
||||
void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_skill, const char* orig_message, const char* targetname) {
|
||||
void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_skill, const char* orig_message, const char* targetname, bool is_silent) {
|
||||
char message[4096];
|
||||
strn0cpy(message, orig_message, sizeof(message));
|
||||
|
||||
@@ -1168,7 +1168,10 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
|
||||
if (GetPet() && GetTarget() == GetPet() && GetPet()->FindType(SE_VoiceGraft))
|
||||
sender = GetPet();
|
||||
|
||||
entity_list.ChannelMessage(sender, chan_num, language, lang_skill, message);
|
||||
if (!is_silent) {
|
||||
entity_list.ChannelMessage(sender, chan_num, language, lang_skill, message);
|
||||
}
|
||||
|
||||
parse->EventPlayer(EVENT_SAY, this, message, language);
|
||||
|
||||
if (sender != this)
|
||||
|
||||
Reference in New Issue
Block a user