From 278972cc7023c0fc36ee66d4ea654b14bcb8fe43 Mon Sep 17 00:00:00 2001 From: AardCrowley Date: Thu, 1 Sep 2022 14:38:50 -0400 Subject: [PATCH] Update FilterChecker.xml --- FilterChecker/FilterChecker.xml | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/FilterChecker/FilterChecker.xml b/FilterChecker/FilterChecker.xml index d413b09..6951a7f 100644 --- a/FilterChecker/FilterChecker.xml +++ b/FilterChecker/FilterChecker.xml @@ -41,20 +41,27 @@ dofile(GetInfo(60) .. "aardwolf_colors.lua") require 'gmcphelper' filterTable = { - {filter = "transcendence", channel = "epics", action = "ColourNote('white', 'blue', 'Transcendence mentioned!')", include="tran"}, - {filter = "test", channel = "gtell", action = "Send('smile')", include=""}, + {filter = "transcendence", channel = "epics", sound = "gametalk.wav", include = "tran"}, + {filter = "transcendence", channel = "gtell", sound = "gametalk.wav", include = "tran"}, + {filter = "yuna", channel = "say", sound = "gclan.wav", include = "yun"}, + {filter = "yuna", channel = "epics", sound = "gclan.wav", include = "yun"}, + {filter = "yuna", channel = "gtell", sound = "gclan.wav", include = "yun"}, + {filter = "yuna", channel = "clantalk", sound = "gclan.wav", include = "yun"}, + {filter = "yuna", channel = "gossip", sound = "gclan.wav", include = "yun"}, } function OnPluginBroadcast(msg, id, name, text) if (id == "3e7dedbe37e44942dd46d264") and (text == "comm.channel") then - local msg = strip_colours(gmcp("comm.channel.msg")):upper() - local doAction = "" - for _,v in ipairs(filterTable) do - assert(type(v.action) == "function" or type(v.action) == "string") - doAction = loadstring(v.action) - if v.channel == gmcp("comm.channel.chan") and v.filter:upper() ~= gmcp("char.base.name"):upper() and filterCheck(msg, v.filter:upper(), v.include:upper()) then - doAction() - break + if gmcp("comm.channel.player")) ~= gmcp("char.base.name") then + local msg = strip_colours(gmcp("comm.channel.msg")):upper() + local doAction = "" + for _,v in ipairs(filterTable) do + assert(type(v.action) == "function" or type(v.action) == "string") + doAction = loadstring(v.action) + if v.channel == gmcp("comm.channel.chan") and v.filter:upper() ~= gmcp("char.base.name"):upper() and filterCheck(msg, v.filter:upper(), v.include:upper()) then + doAction() + break + end end end end