All pastes #90778 Raw Edit

Mine

public text v1 · immutable
#90778 ·published 2006-07-18 00:59 UTC
rendered paste body
PingPong = {}

function PingPong:Enable()
  local Paddle = CreateFrame("Frame")
  Paddle:SetScript("OnEvent", self.OnEvent)
  Paddle:RegisterEvent("MINIMAP_PING")
end

function PingPong:OnEvent()
  if (event == "MINIMAP_PING") then
    local userName = UnitName(arg1);
    if (userName ~= UnitName("player")) then
      DEFAULT_CHAT_FRAME:AddMessage((userName.." pinged minimap"), 1, 1, 0);
    end
  end
end

PingPong:Enable()