Refactor CfPop event to allow plugins to hook it

This commit is contained in:
Katelyn Gigante 2020-01-30 17:16:06 +11:00
parent c41f3cee34
commit ea9acd3aea
2 changed files with 11 additions and 2 deletions

View file

@ -38,6 +38,7 @@ namespace Dalamud.DiscordBot {
this.socketClient = new DiscordSocketClient();
this.socketClient.Ready += SocketClientOnReady;
this.dalamud.NetworkHandlers.ProcessCfPop += ProcessCfPop;
}
private XivChatType GetChatTypeBySlug(string slug) {
@ -103,6 +104,9 @@ namespace Dalamud.DiscordBot {
}
public async Task ProcessCfPop(JObject contentFinderCondition) {
if (!this.IsConnected)
return;
var contentName = contentFinderCondition["Name"];
if (this.config.CfNotificationChannel == null)