vanilla-wow-addons – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 --[[
2  
3 MapPinger v0.1
4  
5 MapPinger display in chat window info about Minimap ping. Writed for control strange
6 players who **spaming** ping in raids or Battlegrounds.
7  
8 Usage: just install addon and see to you main chat frame. When someone in you
9 group/raid except you, ping minimap, you will reņeive information message
10 about it.
11 ]]
12  
13 function MapPinger_OnLoad()
14 this:RegisterEvent("MINIMAP_PING");
15 end
16  
17 function MapPinger_OnEvent()
18 if (event == "MINIMAP_PING") then
19 local userName = UnitName(arg1);
20 if (userName ~= UnitName("player")) then
21 DEFAULT_CHAT_FRAME:AddMessage((userName.." pinged minimap"), 1, 1, 0);
22 end
23 end
24  
25 end