Implement friend tracker
This commit is contained in:
5
FreshShit/FriendTracker/event.lua
Normal file
5
FreshShit/FriendTracker/event.lua
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
-- FRIENDLIST_UPDATE
|
||||||
|
function(e)
|
||||||
|
-- Event triggered by ShowFriends()
|
||||||
|
aura_env.FileFriends()
|
||||||
|
end
|
19
FreshShit/FriendTracker/init.lua
Normal file
19
FreshShit/FriendTracker/init.lua
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
if not WeakAurasSaved.Cyka then WeakAurasSaved.Cyka = {} end
|
||||||
|
if not WeakAurasSaved.Cyka.Friends then WeakAurasSaved.Cyka.Friends = {} end
|
||||||
|
|
||||||
|
aura_env.FileFriends = function()
|
||||||
|
local info = {}
|
||||||
|
local now = date("%y-%m-%dT%H:%M:%S")
|
||||||
|
local friends = GetNumFriends()
|
||||||
|
for i = 1, friends do
|
||||||
|
local name, level, class, area, connected, status, note, noteType = GetFriendInfo(i)
|
||||||
|
table.insert(info, {
|
||||||
|
["name"] = name,
|
||||||
|
["connected"] = connected,
|
||||||
|
["area"] = area,
|
||||||
|
["status"] = status,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
DevTools_Dump(info)
|
||||||
|
WeakAurasSaved.Cyka.Friends[now] = info
|
||||||
|
end
|
Reference in New Issue
Block a user