Get information on a guild by guild name
Is there a way to get guild information based on its name, programmatically?
|
No. The only two functions available to get data about a guild you aren't in are GetGuildInfo(unit) and GetInspectGuildInfo(unit), both requiring a unit.
Code:
local guildName, guildRankName, guildRankIndex, realm = GetGuildInfo(unit) Code:
local name, level, numMembers, achPoints = GetRecruitingGuildInfo(index) |
The reason I want it is I have written a spam filter for LFG and Trade, and I want it to block Guild recruiting messages. So I have filtered out "<Guild XYZ> 8/8 HC ..." type messages but some guys are now clever and avoid enclosing the guild name in brackets, so the mssages that escape are, "Guild XYZ 8/8 HC ..." !
My idea was to scan the first 1-3 words to check if it's valid guild name and filter on that. Another idea was to *assume* that the spammer was necessarily in the guild concerned, therefore I could get the guild name from the spammer's name. But even that failed because GetGuildInfo requires "party1" or "target" etc and not something like "Dorkhead-Sylvannas" type of argument. |
The only way around that is to use the /who API, and since that's not instant, filtering the message directly won't work.
Personally, I've been filling BadBoy's custom filter list. When I see a new ad, I just add the guild name or some identifiable part of the ad. If you're curious, this is my BadBoy list: Code:
BADBOY_CCLEANER = { The best one is "raidtargetingicon" which catches all raid icons by matching the text that formats into the icon. |
I see, you have an "ignore list" of sorts but instead of players it is composed of guilds...
|
I don’t believe in ignoring players unless they’re directly whispering me or are truly a menace in a public channel. Ads aren’t a good enough reason for me to ignore them since I can just filter the ad with BadBoy.
My ignore list has actually been empty since Draenor. |
All times are GMT -6. The time now is 10:38 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI