mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-27 09:56:03 +00:00
chat: option to /who search unknown names
This commit is contained in:
committed by
GitHub
parent
df2ac5dc61
commit
3cb2c70385
@@ -645,6 +645,7 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("chat", "text", "playerlinks", "1")
|
||||
pfUI:UpdateConfig("chat", "text", "detecturl", "1")
|
||||
pfUI:UpdateConfig("chat", "text", "classcolor", "1")
|
||||
pfUI:UpdateConfig("chat", "text", "whosearchunknown", "0")
|
||||
pfUI:UpdateConfig("chat", "left", "width", "380")
|
||||
pfUI:UpdateConfig("chat", "left", "height", "180")
|
||||
pfUI:UpdateConfig("chat", "right", "enable", "0")
|
||||
|
||||
Vendored
+1
@@ -770,6 +770,7 @@ pfUI_translation["deDE"] = {
|
||||
["Website"] = nil,
|
||||
["Welcome to |cff33ffccpf|cffffffffUI|r!\n\nI'm the first run wizard that will guide you through some basic configuration. If you're lazy, feel free to hit the \"Defaults\" button. If you wish to run this dialog again, go to the settings and hit the \"Reset Firstrun\" button.\n\nVisit |cff33ffcchttp://shagu.org|r to check for the latest version."] = nil,
|
||||
["Whitelist"] = nil,
|
||||
["Who Search Unknown Classes"] = nil,
|
||||
["Width"] = nil,
|
||||
["Wobble Zoom"] = nil,
|
||||
["Won"] = nil,
|
||||
|
||||
Vendored
+1
@@ -770,6 +770,7 @@ pfUI_translation["enUS"] = {
|
||||
["Website"] = nil,
|
||||
["Welcome to |cff33ffccpf|cffffffffUI|r!\n\nI'm the first run wizard that will guide you through some basic configuration. If you're lazy, feel free to hit the \"Defaults\" button. If you wish to run this dialog again, go to the settings and hit the \"Reset Firstrun\" button.\n\nVisit |cff33ffcchttp://shagu.org|r to check for the latest version."] = nil,
|
||||
["Whitelist"] = nil,
|
||||
["Who Search Unknown Classes"] = nil,
|
||||
["Width"] = nil,
|
||||
["Wobble Zoom"] = nil,
|
||||
["Won"] = nil,
|
||||
|
||||
Vendored
+1
@@ -770,6 +770,7 @@ pfUI_translation["esES"] = {
|
||||
["Website"] = "Sitio de web",
|
||||
["Welcome to |cff33ffccpf|cffffffffUI|r!\n\nI'm the first run wizard that will guide you through some basic configuration. If you're lazy, feel free to hit the \"Defaults\" button. If you wish to run this dialog again, go to the settings and hit the \"Reset Firstrun\" button.\n\nVisit |cff33ffcchttp://shagu.org|r to check for the latest version."] = "¡Bienvenido a |cff33ffccpf|cffffffffUI|r!\n\nSoy el asistente de instalación que te guiará con la configuración básica. Si prefieres, puedes hacer clic el botón \"Predeterminado\" para cargar la configuración por defecto. Si quieres abrir este diálogo de nuevo, ve a la configuración y haz clic en el botón \"Reiniciar Primera vez\".\n\nVisita |cff33ffcchttp://shagu.org|r para descargar la última versión.",
|
||||
["Whitelist"] = "Lista blanca",
|
||||
["Who Search Unknown Classes"] = nil,
|
||||
["Width"] = "Ancho",
|
||||
["Wobble Zoom"] = "Acerca tambalea",
|
||||
["Won"] = "Ganado",
|
||||
|
||||
Vendored
+1
@@ -770,6 +770,7 @@ pfUI_translation["frFR"] = {
|
||||
["Website"] = "Site web",
|
||||
["Welcome to |cff33ffccpf|cffffffffUI|r!\n\nI'm the first run wizard that will guide you through some basic configuration. If you're lazy, feel free to hit the \"Defaults\" button. If you wish to run this dialog again, go to the settings and hit the \"Reset Firstrun\" button.\n\nVisit |cff33ffcchttp://shagu.org|r to check for the latest version."] = "Bienvenue sur l'assistant d'installation de l'interface |cff33ffccpf|cffffffffUI|r!\n\nNous allons effectuer quelques configurations de base. Si vous n'avez pas la patience, cliquer sur le bouton \"Paramètres par défaut\". Si vous souhaitez relancer cette fenêtre de dialogue, allez dans les options et cliquez sur le bouton\"Réinitialiser l'assistant d'installation\" .\n\nAllez sur |cff33ffcchttp://shagu.org|r pour télécharger la dernière version.",
|
||||
["Whitelist"] = "List blanche",
|
||||
["Who Search Unknown Classes"] = nil,
|
||||
["Width"] = "Largeur",
|
||||
["Wobble Zoom"] = "Zoom oscillant",
|
||||
["Won"] = "A gagné",
|
||||
|
||||
Vendored
+1
@@ -770,6 +770,7 @@ pfUI_translation["koKR"] = {
|
||||
["Website"] = nil,
|
||||
["Welcome to |cff33ffccpf|cffffffffUI|r!\n\nI'm the first run wizard that will guide you through some basic configuration. If you're lazy, feel free to hit the \"Defaults\" button. If you wish to run this dialog again, go to the settings and hit the \"Reset Firstrun\" button.\n\nVisit |cff33ffcchttp://shagu.org|r to check for the latest version."] = "|cff33ffccpf|cffffffffUI|r에 |cff33ffcc오신걸 환영합니다.|r \n\n저는 몇 가지 기본 구성을 안내 할 첫 번째 실행 위자드입니다. 모든 단계를 건너 뛰고 싶으시면 \"기본값 사용\" 버튼을 누르십시오. 이 대화 상자를 다시 실행하려면 추후 설정으로 이동하여 \"첫단계로 재설정\" 버튼을 누르십시오.\n\n최신버전 다운로드 사이트: |cff33ffcchttp://shagu.org|r",
|
||||
["Whitelist"] = nil,
|
||||
["Who Search Unknown Classes"] = nil,
|
||||
["Width"] = nil,
|
||||
["Wobble Zoom"] = nil,
|
||||
["Won"] = nil,
|
||||
|
||||
Vendored
+1
@@ -770,6 +770,7 @@ pfUI_translation["ruRU"] = {
|
||||
["Website"] = "Веб-сайт",
|
||||
["Welcome to |cff33ffccpf|cffffffffUI|r!\n\nI'm the first run wizard that will guide you through some basic configuration. If you're lazy, feel free to hit the \"Defaults\" button. If you wish to run this dialog again, go to the settings and hit the \"Reset Firstrun\" button.\n\nVisit |cff33ffcchttp://shagu.org|r to check for the latest version."] = "Добро пожаловать в |cff33ffccpf|cffffffffUI|r!\n\nЯ мастер первого запуска, который проведет вас через некоторую базовую конфигурацию. Если вы ленитесь, не стесняйтесь нажать кнопку \"По умолчанию\". Если вы хотите снова запустить этот диалог, перейдите к настройкам и нажмите кнопку \"Первый запуск\".\n\nПосетите |cff33ffcchttp://shagu.org|r, чтобы проверить последнюю версию.",
|
||||
["Whitelist"] = "\"Белый\" список",
|
||||
["Who Search Unknown Classes"] = nil,
|
||||
["Width"] = "Ширина",
|
||||
["Wobble Zoom"] = "Подпрыгивание",
|
||||
["Won"] = "Победа",
|
||||
|
||||
Vendored
+1
@@ -770,6 +770,7 @@ pfUI_translation["zhCN"] = {
|
||||
["Website"] = "网站",
|
||||
["Welcome to |cff33ffccpf|cffffffffUI|r!\n\nI'm the first run wizard that will guide you through some basic configuration. If you're lazy, feel free to hit the \"Defaults\" button. If you wish to run this dialog again, go to the settings and hit the \"Reset Firstrun\" button.\n\nVisit |cff33ffcchttp://shagu.org|r to check for the latest version."] = "欢迎使用 |cff33ffccpf|cffffffffUI|r! \n\n这是第一次运行向导,将引导您完成一些基本配置。 如果你想跳过所有步骤\"使用默认\"按钮。 如果您再次运行此对话框,请转到设置并点击 \"Reset Firstrun\" 按钮。\n\n访问 |cff33ffcchttp://shagu.org|r 检查最新版本。",
|
||||
["Whitelist"] = "白名单",
|
||||
["Who Search Unknown Classes"] = nil,
|
||||
["Width"] = nil,
|
||||
["Wobble Zoom"] = "摆动变焦",
|
||||
["Won"] = nil,
|
||||
|
||||
Vendored
+1
@@ -770,6 +770,7 @@ pfUI_translation["zhTW"] = {
|
||||
["Website"] = nil,
|
||||
["Welcome to |cff33ffccpf|cffffffffUI|r!\n\nI'm the first run wizard that will guide you through some basic configuration. If you're lazy, feel free to hit the \"Defaults\" button. If you wish to run this dialog again, go to the settings and hit the \"Reset Firstrun\" button.\n\nVisit |cff33ffcchttp://shagu.org|r to check for the latest version."] = "歡迎使用 |cff33ffccpf|cffffffffUI|r! \n\n這是第一次運行嚮導,將引導您完成一些基本配置。 如果你想跳過所有步驟\"使用預設\"按鈕。 如果您再次運行此對話方塊,請轉到設置並點擊 \"Reset Firstrun\" 按鈕。\n\n訪問 |cff33ffcchttp://shagu.org|r 檢查最新版本。",
|
||||
["Whitelist"] = "白名單",
|
||||
["Who Search Unknown Classes"] = nil,
|
||||
["Width"] = nil,
|
||||
["Wobble Zoom"] = nil,
|
||||
["Won"] = nil,
|
||||
|
||||
@@ -695,6 +695,31 @@ pfUI:RegisterModule("chat", "vanilla:tbc", function ()
|
||||
local r,g,b = strsplit(",", C.chat.text.unknowncolor)
|
||||
local unknowncolorhex = rgbhex(r,g,b)
|
||||
|
||||
local nothing = function() return end
|
||||
local original = FriendsFrame_OnEvent
|
||||
|
||||
local who_query = CreateFrame("Frame")
|
||||
who_query:RegisterEvent("WHO_LIST_UPDATE")
|
||||
who_query:SetScript("OnEvent", function()
|
||||
if this.pending then
|
||||
-- restore everything once a query is received
|
||||
_G.FriendsFrame_OnEvent = original
|
||||
this.pending = nil
|
||||
SetWhoToUI(0)
|
||||
end
|
||||
end)
|
||||
|
||||
local function ScanWhoName(name)
|
||||
-- abort if another query is ongoing
|
||||
if who_query.pending then return end
|
||||
who_query.pending = true
|
||||
|
||||
-- prepare and send the who query
|
||||
_G.FriendsFrame_OnEvent = nothing
|
||||
SetWhoToUI(1)
|
||||
SendWho("n-"..name)
|
||||
end
|
||||
|
||||
local function AddMessage(frame, text, a1, a2, a3, a4, a5)
|
||||
if not text then return end
|
||||
|
||||
@@ -731,6 +756,8 @@ pfUI:RegisterModule("chat", "vanilla:tbc", function ()
|
||||
color = rgbhex(RAID_CLASS_COLORS[class])
|
||||
match = true
|
||||
end
|
||||
elseif C.chat.text.whosearchunknown == "1" then
|
||||
ScanWhoName(name)
|
||||
end
|
||||
|
||||
if C.chat.text.tintunknown == "1" or match then
|
||||
|
||||
@@ -2155,6 +2155,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
|
||||
CreateConfig(nil, T["Generate Playerlinks"], C.chat.text, "playerlinks", "checkbox")
|
||||
CreateConfig(nil, T["Enable URL Detection"], C.chat.text, "detecturl", "checkbox")
|
||||
CreateConfig(nil, T["Enable Class Colors"], C.chat.text, "classcolor", "checkbox")
|
||||
CreateConfig(nil, T["Who Search Unknown Classes"], C.chat.text, "whosearchunknown", "checkbox")
|
||||
CreateConfig(nil, T["Colorize Unknown Classes"], C.chat.text, "tintunknown", "checkbox")
|
||||
CreateConfig(nil, T["Unknown Class Color"], C.chat.text, "unknowncolor", "color")
|
||||
CreateConfig(nil, T["Left Chat Width"], C.chat.left, "width")
|
||||
|
||||
Reference in New Issue
Block a user