WoWInterface SVN GuildFilterFinder

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 1 to Rev 2
    Reverse comparison

Rev 1 → Rev 2

GuildFinderFilter/license.txt New file
0,0 → 1,6
The following license excludes the libraries (Libs) included. See the libraries directory or website.
 
This AddOn is public domain. That means you can change it, rename it or paint it yellow.
My name (Rilgamon) is valid only for WoWInterface.com and curse.com.
If you use/offer this addon on another website please remove my name.
If you want to give me credit you can replace it with a link to my profile on WoWInterface.com.
\ No newline at end of file
GuildFinderFilter/icon2.tga Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes : Added: svn:mime-type + application/octet-stream
GuildFinderFilter/GuildFinderFilter.toc New file
0,0 → 1,11
## Interface:40200
## Title: GuildFinderFilter
## Notes: Lists online applicants
## Author: Rilgamon
## Version: 40200.wowi:revision
## X-WoWI-ID:
## SavedVariables: GuildFinderFilterDB
## OptionalDeps: Ace3, BrokerPack
standalone.xml
LibWho-2.0\LibWho-2.0.lua
pack.xml
GuildFinderFilter/standalone.xml New file
0,0 → 1,4
<Ui xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
<Include file="Libs\embed.xml"/>
<Include file="common\common.xml"/>
</Ui>
\ No newline at end of file
GuildFinderFilter/core.lua New file
0,0 → 1,112
local name, addon = ...
local parentName = addon['parentName'] or "BrokerPack"
local childName = "GuildFinderFilter"
local wholib = LibStub:GetLibrary('LibWho-2.0'):Library()
addon['childs'] = addon['childs'] or {}
addon['childs'][#addon['childs'] + 1] = childName
local defaults = {}
local options = {}
local db
 
addon['inits'] = addon['inits'] or {}
 
local function OnText(message)
addon['OnText'](message, childName)
end
-- DeclineGuildApplicant
-- GetGuildApplicantInfo
-- GetNumGuildApplicants
-- LF_GUILD_BROWSE_UPDATED
-- LF_GUILD_MEMBERSHIP_LIST_CHANGED
-- LF_GUILD_MEMBERSHIP_LIST_UPDATED
-- LF_GUILD_POST_UPDATED
-- LF_GUILD_RECRUITS_UPDATED
-- LF_GUILD_RECRUIT_LIST_CHANGED
 
local apps = {}
local appsInfo = {}
local function updateDisplay()
local n = 0
for k,v in pairs(apps) do
if(v) then
n = n + 1
-- print("on", k)
end
end
OnText(format("%i/%i",n,GetNumGuildApplicants()))
end
 
local function UserDataReturned(user, t)
if(not user) then return end
apps[user['Name']] = user['Online']
updateDisplay()
end
 
local function scan()
apps = {}
for i=1,GetNumGuildApplicants() do
local name = GetGuildApplicantInfo(i)
appsInfo[name] = {GetGuildApplicantInfo(i)}
local user,t = wholib:UserInfo(name, { callback = UserDataReturned } )
if(user) then
UserDataReturned(user, t)
end
end
 
end
 
local function onevent(self, event, arg1, ...)
if(self.nextevent > GetTime()) then return end
self.nextevent = GetTime() + 1
if(event=="ADDON_LOADED") then
if(arg1=="Blizzard_LookingForGuildUI") then
RequestGuildApplicantsList()
end
else
scan()
end
end
 
local function onupdate(self, elapsed)
if(self.next > GetTime()) then return end
self.next = GetTime() + 300
RequestGuildApplicantsList()
end
 
local function OnTooltip()
GameTooltip:ClearLines()
GameTooltip:AddLine(childName)
for k,v in pairs(apps) do
if(v) then
GameTooltip:AddLine(format("%s (%i)",k,appsInfo[k][2]))
end
end
end
 
local function init()
-- print("init",childName)
local f=CreateFrame("Frame")
-- LoadAddOn("Blizzard_GuildUI")
 
f.next = 0
f.nextevent = 0
f:SetScript("OnUpdate", onupdate)
f:SetScript("OnEvent", onevent)
f:RegisterEvent("LF_GUILD_BROWSE_UPDATED")
f:RegisterEvent("LF_GUILD_MEMBERSHIP_LIST_CHANGED")
f:RegisterEvent("LF_GUILD_MEMBERSHIP_LIST_UPDATED")
f:RegisterEvent("LF_GUILD_POST_UPDATED")
f:RegisterEvent("LF_GUILD_RECRUITS_UPDATED")
f:RegisterEvent("LF_GUILD_RECRUIT_LIST_CHANGED")
f:RegisterEvent("ADDON_LOADED")
LoadAddOn("Blizzard_LookingForGuildUI")
addon['ldbs'][#addon['ldbs'] + 1] = {
['name'] = childName,
['type'] = "data source",
['OnTooltipShow'] = OnTooltip,
}
options = addon['setupPrefs'](childName, parentName, addon['db'], defaults, false)
db = addon['db']['profile'][childName]
end
 
addon['inits'][childName] = init
\ No newline at end of file
GuildFinderFilter/pack.xml New file
0,0 → 1,3
<Ui xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
<Script file="core.lua"/>
</Ui>
\ No newline at end of file
GuildFinderFilter Property changes : Added: bugtraq:number + true
. Property changes : Added: svn:externals + GuildFinderFilter/common svn://svn.wowinterface.com/zzcommon-841/trunk/common GuildFinderFilter/Libs svn://svn.wowinterface.com/zzcommon-841/trunk/Libs GuildFinderFilter/LibWho-2.0 svn://svn.wowace.com/wow/wholib/mainline/trunk/LibWho-2.0