WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Get information on a guild by guild name (https://www.wowinterface.com/forums/showthread.php?t=56781)

doofus 10-10-18 01:11 PM

Get information on a guild by guild name
 
Is there a way to get guild information based on its name, programmatically?

Kanegasi 10-10-18 01:55 PM

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)
local guildPoints, guildNumMembers, guildName = GetInspectGuildInfo(unit)

You can, however, try to iterate through the guild recruitment frame and feed indexes into GetRecruitingGuildInfo(index), but finding a guild there requires that the GM has listed it as recruiting.

Code:

local name, level, numMembers, achPoints = GetRecruitingGuildInfo(index)
Using /guildinfo or /run GuildInfo() will print some more information about your current guild into CHAT_MSG_SYSTEM events, such as creation date.

doofus 10-11-18 02:26 PM

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.

Kanegasi 10-11-18 03:00 PM

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 = {
        "(selling)",
        "<aspirants of asgard>",
        "<calculated chaos>",
        "<exordium>",
        "<ez>",
        "<grey parse elitests>",
        "<immortal>",
        "<infinity>",
        "<lose your life>",
        "<mature content>",
        "<metacortex>",
        "<notion>",
        "<obscure radiance>",
        "<obscureradiance>",
        "<relapse>",
        "<reload-dalaran>",
        "<reload>",
        "<ricos roughnecks>",
        "<the fort>",
        "<welfare epics>",
        "[chaosity]",
        "for more info",
        "group selling",
        "heroic argus only",
        "hollow point marshmallow",
        "kirby carries",
        "nfa realm first keystone",
        "raidtargetingicon",
        "selling  mythic",
        "selling antorus",
        "selling daily",
        "selling full clear",
        "selling heroic",
        "selling mythic",
        "selling normal",
        "stormseekers",
        "where fun and autism meet",
        "wts antorus",
        "wts argus",
        "wts h antorus",
        "wts h argus",
        "wts heroic",
        "wts mythic",
        "wts normal",
        "wts quick heroic antorus",
        "wts uldir",
}


The best one is "raidtargetingicon" which catches all raid icons by matching the text that formats into the icon.

doofus 10-14-18 02:40 AM

I see, you have an "ignore list" of sorts but instead of players it is composed of guilds...

Kanegasi 10-14-18 09:07 AM

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