[Saylinks] Implement Auto Saylink Injection (#1525)

* Implement auto saylink injection

* Cover Lua say since it takes a different code path
This commit is contained in:
Chris Miles
2021-09-12 22:08:30 -05:00
committed by GitHub
parent 94c1a50cc8
commit 6b93130c13
8 changed files with 112 additions and 30 deletions
+13 -4
View File
@@ -2923,10 +2923,19 @@ void Mob::Say(const char *format, ...)
talker = this;
}
entity_list.MessageCloseString(
talker, false, 200, 10,
GENERIC_SAY, GetCleanName(), buf
);
if (RuleB(Chat, AutoInjectSaylinksToSay)) {
std::string new_message = EQ::SayLinkEngine::InjectSaylinksIfNotExist(buf);
entity_list.MessageCloseString(
talker, false, 200, 10,
GENERIC_SAY, GetCleanName(), new_message.c_str()
);
}
else {
entity_list.MessageCloseString(
talker, false, 200, 10,
GENERIC_SAY, GetCleanName(), buf
);
}
}
//