Quantcast
Download
(28 Kb)
Download
Updated: 03/31/19 08:32 PM
Pictures
File Info
Compatibility:
Wrathstone (4.3)
Updated:03/31/19 08:32 PM
Created:08/07/18 07:17 PM
Monthly downloads:1,281
Total downloads:9,667
Favorites:39
MD5:
Categories:Group, Guild & Friends, Chat Mods, PvP, Raid Mods, Miscellaneous, Utility Mods
4.3
LGM - Lilith's Group Manager  Popular! (More than 5000 hits)
Version: 4.1
by: Drummerx04 [More]
As a spiritual successor to AutoInvite, LGM is designed to fit the needs of anyone who forms a group ever, with savable groups, simplified automatic invites, offline kick, and an in depth group death recap tracker... because why not?

The LGM interface is connected to the in-game Group Window, and can be selected from the List on the left of the same window. LGM is further split into Invite, Raid, and Death panels accessible from the Menu Bar at the top of the LGM window. (See Images)

Here's a tutorial video I threw together for the people who like to see things: It is slightly outdated, but still enough to get the gist of it


Features:
  • Chat Scan invites - Specify multiple invite strings for each guild, zone, and whispers. Each alphanumeric word entered into each field will scan incoming chat messages for any of those words that appear anywhere in the chat message... and then instantly invite them to the group. (See Images)
  • Offline Autokick - Group Members that go offline will be automatically kicked after a configurable amount of time (5 - 120 seconds)
  • Alt Character auto kick - When someone in your group logs off while in group, then joins the group with another character on the same account, the offline character will be kicked automatically. (toggle off with slash command)
  • Max Group Size - Set a soft group size limit (2-24). Invites attempted while your group is at the selected size will fail, but previously sent invites can still be accepted (and will breech the set limit).
  • Invite Feedback - The response to your group invites will no longer beep at you and appear in the upper right briefly. The responses are now a part of the invite panel and remain there until you reload ui, clear the list, or crash to desktop. Any invite that does not go through for any reason can be resent with a simple button click.
  • Raid Groups - You can now form raid groups ahead of time and batch invite them at your leisure. New members are added to the raid group by right clicking their name from the Vanilla Group List, Friends List, or Guild Roster and selecting the new option "Add to Raid Group" from the resulting menu. Multiple Raid Groups are supported.
  • Active Invite Lists - Each list provides can mark a member as "active" or "inactive" by simply left clicking on their respective entry in LGM. This allows them to stay in the Raid or Invite lists, but they will be skipped by the batch invite features. This feature is designed for raid groups that have regular filling players in addition to the standard 12 man group.
  • Invite Suggestions - A new option to automatically scan @names from group and whisper chat. The names will be added to the Invite Panel for easy access.
  • Re-invites - Everyone that enters your group (or is sent an invite by you) is added to the LGM invite list until removed by a reset, clear, crash etc. Any failed invites for any reason can be resent together with the batch invites. This is also a defacto group reform feature. Simply disband, and then batch invite the group again. This even works if you were not initially the group leader.
  • Track Online Status - As visible in the images, the online status of your raid groups are easily visible from the Raid Panel so you always know who to yell at for being absent with a simple glance.
  • Invite people hiding offline - This is almost an accidental feature, but the raid batch invites can catch people hiding offline. None can hide from the Raid Leader!
  • Death Recap - Tracks and saves the total deaths and cause of death for all nearby group members (and yourself). Death recaps can be viewed in a clean and orderly fashion from a standalone panel within LGM with a breakdown of what killed who and how often. There are multiple ways to share death info via group chat. Check the tooltip on the button in the Deaths Panel.
  • Group Death Recap Timeline - View the time of death and death recap for every member of your group. Finally track down what's actually killing your people.
  • Wipe Indicators - Intermediate death recaps are stored automatically every time your group wipes
  • Real Time Death Recaps - The death recaps can be configured to appear on screen during gameplay at a configurable length and position. (See Slash Commands)
  • Group Healing - The death recaps now include healing received between damage taken events. The healing received will be sorted by the largest healing source to smallest.
  • Updated Death recap

Slash Commands
  • /lgm - Prints help menu for /lgm slash command
  • /lgm togglemove - Makes the recap window appear so it can be given a new default position.
  • /lgm s|summary - Populate group chat with the current display in the death panel (order and format are based on the list in the Death Panel)
  • /lgm recap #number - specify a number of history items in the death recaps. Takes effect on new death recaps.
  • /lgm liverecap #number - specify a number of rows to be displayed on the real time popup window. 0 = off
  • /lgm trackdeaths - toggle whether or not LGM tracks your group's deaths
  • /lgm altkick - toggles whether or not alt characters are kicked automatically (independent of offline kick timer)
Version 4.1
  • Added a real time death recap feature. The new window will pop up whenever someone dies to give the same information found on the timeline. The popup window is off by default (liverecap = 0) and can be toggled on by giving it a new length between 1 and the max row length of the timeline recap.
  • Added new "/lgm" arguments. "/lgm togglemove" allows the real time window to be relocated. "/lgm liverecap <integer>" gives the recap window a configurable length or turns the feature off.
  • Added a debug statement to Auto Alt Kick to make it clear what is happening when someone gets booted. I believe there is still a bug in the feature related to the ****ty API reliability around forming groups. I may have to approach the feature from a different angle.
  • Updated death recaps to remove the time difference label on healing rows. Since healing rows are a summary of all healing between 2 damage rows, the time field didn't really add anything usable.
  • The recaps are no longer anchored to the row that spawn them. They will now be anchored near the top of the timeline list.
  • Added a space for more general information at the top of the timeline. Currently just has the player name at the top for convenience with the real time popup.

Version 4.0
  • Updated the positioning of controls in the Death Panel. It is now standardized to the other two panels
  • Added Healing Taken events to all death recaps. This is to provide healing context to the deaths in the timeline. Healing sources are sorted by raw amount and aggregated between damage occurrences.
  • Adjusted the font used across all lists in LGM to be a little smaller and less blocky.

Version 3.8
  • LibAddonMenu-2.0 is no longer included, so you must install it separately.
  • Updated the timeline to include group wipe markers that also store the intermediate death summaries leading up to that wipe. Now it is vastly easier to get a clear image of which deaths belong to which pull.
  • Added a new function to the Death Reset Button. Shift+M1 will now place a uniquely indicated marker that also includes an intermediate death recap. It's like the wipe indicator, but you can place it whenever you want (to clean up the timeline before a boss fight without deleting all the previous data for instance)
  • The wipe markers act as buttons to access the summary data. M1 will toggle total/intermediate player deaths, and M2 will toggle between total/intermediate cause summaries.
  • Added an option (off by default) to automatically select LGM (instead of the default group frame) during the first time the UI is loaded. Subsequently bringing up the group menu will still default to the last selected node, so this only affects the initial opening of the group window. Toggle this feature with "/lgm autoselect"
  • Shortened the Label for this addon in the group menu "Lilith's Group Manager" --> "L.G.M."

Version 3.6.1
  • Fixed an bug where Auto Alt Kick would automatically remove offline players upon the initial (re)load of the game UI. Offline characters should now only be kicked by this feature if they are actually "Alts"
  • Added a new entry box to the Raid panel to add new @names to the raid list directly. The "Add Member" field can handle multiple display names and supports common delimiters. (@name1, @name2 @name3 - @etc)

Version 3.6
  • Fixed Auto Alt Kick. The menu option now properly toggles the AAK, and AAK now more properly detects the presence of an Alt and kicks the alt reliably.
  • Added a developer toggle on the Death Panel. Shift+M2 on the Reset/clear button will now set the recap displays to also display ability ids before the ability name. (Useful mostly for developers to discover the IDs of moves that are killing the group)
  • Fixed an issue where invite responses sent to character names were not properly detected and displayed.
  • Added an option to clear the Invite List of all non grouped members in the list (Shift+Mouse 2 on invite button)
  • Added an indicator to the Raid Panel to display (selected players) / (total players) in the raid group. This mostly exists to see how many will be invited at a glance.
  • Updated tooltips to properly reflect what the buttons actually do.
  • General code efficiency improvements.
  • API bump for Wrathstone (100026)

Version 3.5
  • In the invite list, Shift+Right Click will now add the player to the current Raid Group.
  • Updated the "Invite Group" button in the invite panel. Shift+Left click will now add all active players in the Invite List to the current raid group. This is effectively an instant "Save Current Group" feature. The button tooltip documents this feature.
  • The Friend, Guild Roster, and Vanilla group lists can now add players to the current Raid Group by clicking Mouse 3,4, or 5 in addition to right clicking and selection "Add to Raid Group"
  • Leaving/disbanding/getting kicked from your group will now disable all Automatic inviting features. (Feedback provided by YudaiNao). The chat scan invites are not yet disabled automatically if you log out while in group.
  • The automatic alt kicking feature can now be toggled from the Invite Panel in addition to the slash command

Version 3.2
  • Added a beta version of alt character autokick (independent of*timed kick, more useful for PvE raids when people are changing characters). Toggled with "/lgm altkick"
  • Added the ability to filter the death timeline on causes as well as names.
  • LGM now remembers which panel you were on and defaults to it upon a game refresh
  • Group members can now be kicked with Shift+right click
  • Fixed a bug with missing textures in the raid panel. (caused when a member of the raid list is no longer a friend or guildie)
  • Changed the definition of "Unknown Cause" to damage that happened more than 1.5 seconds ago.
  • Fixed a minor bug where your character revives would show up in the timeline as "Unknown Cause" if you were not grouped when dying.
  • Remade the summary popups in the death panel to be a little better formatted.
  • The chat scan AutoInvite will now invite a player that has an offline character in your group.

Version 3.0
  • Improved the death recap display with textures and actual formatting (awaiting feedback on shielded icons)
  • Added class and role indicators to the invite list
  • Replaced the Online/Offline labels with standard textures in the raid frame
  • Improved internal consistency between all death tracking lists
  • "Unknown Cause" is now defined as a death that occurs if more than 0.5 seconds has passed since the last detected damage on a given group member
  • Added filter functionality to the timeline. Click a username in the summary list to immediately filter the timeline on that name. Multiple names are supported simultaneously. Click the name again to disable one filter, or right click the button at the top to clear all filters.
  • Death summary list now keeps itself sorted (which fixes the chat print ordering)
  • Added a "Visit Primary Residence" option to the Raid List members
  • The death tracker is now active when you are not grouped
  • Added a new slash command for (dis|en)abling the death tracker (/lgm trackdeaths)
Version 2.2
  • Added an invitation shortcut to the Invite Panel. Shift+Left Clicking on a name in the list will instantly send and invite.
  • Added group suggestion support. @names placed in group chat or whispers will be added to the Invite List and marked as "Suggest"
  • Added the ability to toggle the suggestion feature.
  • Improved the shield damage aggregation function. Now multiple layers of shields are supported, and which shield is damaged and by what will always be shown.
  • Added a time delta to the death recaps so the timeframe over* which damage occured to cause the death is now visible.

Version 2.1
  • Added an automatic kick feature and slider to the Invite Panel. A setting of 0 seconds disables the Auto Kick, but all other values will kick after the selected amount of time has passed.
  • Added a Max Group Size slider to the Invite Panel. Group invites attempted while the group is already at the Max Value will fail and show up in the Invite List as "LGM Max" Names in the invite List can be used to bypass this limit by right clicking on a name and choosing "Invite Override"

Version 2.0
  • Fixed a bug with the invite list, where certain features would become desynced when a group members left the group
  • Added tracking of the group leader in the invite list (if it isn't you)
  • Added an indicator for offline Grouped members in the invite list. ("Grouped" now turns red)
  • Added a mouse over in the invite list to display the character name for grouped members.
  • Added an automatic invite feature to the Raid Inviter. Will now send an invite to anyone active in the current raid list. This occurs 2 seconds after they log in.
  • Invite Raid Button in Raid Panel now supports a Mouse 2 click to disable the raid auto invite.
  • Added a death timeline to the death panel. Now every death your group suffers is saved in a new list that stores the last X sources of damage and whether or not that damage was blocked or mitigated with a shield.
  • Added a SLASH command to change the length of the death recaps. (/lgm recap #integer) Default is 5
  • Added a button to reset the Death Panel
  • Shortened the height of all lists by 100 pixels
Version 1.1.2
  • Hotfix: Removed testing data from death list... (don't release updates at 1AM)
  • Fixed row highlighting for all lists
  • Improved death tracking (now also tracks pvp related deaths)
  • Fixed crashes related to groupfinder/bgs
  • Added group functionality to key bind strip
  • Added group related options to the invite list
  • Added dialog box to disband button
  • Saved Variables are now bound to account name rather than character name. This means your previously saved raids are now lost unless you edit your savedVars "GroupManager.lua" file
  • If you are feeling adventurous, you can save your raid lists by finding your character settings in the saved variables and changing the character name to "$AccountWide" before loading the game
  • Wolfhunter API Update

Version 1.1
  • Added Death Panel and death tracking/sharing
  • Added preliminary Leader handling on the Invite Panel
  • Added /lgm c and /lgm s slash commands
Post A Reply Comment Options
Unread 04/12/19, 02:33 PM  
Drummerx04
AddOn Author - Click to view AddOns

Forum posts: 37
File comments: 40
Uploads: 5
Originally Posted by ChrisK
Thanks for the lightning fast reply... odd's are it's an issue with PerfectPixel v0.10.23 - but thanks for looking into it.

The fields are just missing - unloading PerfectPixel makes them appear normally.

That's interesting. I'm assuming this is happening on the other LGM panels as well? Those option/settings elements are generated via LibAddonMenu, so there may be a draw layer issue going on with that library. And the bar on the slide bars are also failing to render, weird.

I'm working on an update atm, so I'll see whether this is something I can throw in there.
Last edited by Drummerx04 : 04/12/19 at 02:34 PM.
Report comment to moderator  
Reply With Quote
Unread 04/11/19, 08:19 PM  
ChrisK

Forum posts: 0
File comments: 48
Uploads: 0
Thanks for the lightning fast reply... odd's are it's an issue with PerfectPixel v0.10.23 - but thanks for looking into it.

The fields are just missing - unloading PerfectPixel makes them appear normally.

Report comment to moderator  
Reply With Quote
Unread 04/11/19, 04:16 PM  
Drummerx04
AddOn Author - Click to view AddOns

Forum posts: 37
File comments: 40
Uploads: 5
Originally Posted by ChrisK
Love your Add-On! Makes like in ESO so much better!

One request - when used in conjunction with the Perfect Pixel addon - the boxes to enter Chat Scanning codes are not visible/editable.

Anything you can suggest to help?
Hey, I'm glad you like it.

I'm not sure what's going on with Perfect Pixel, do you have a screenshot of the LGM window with PP active?
Report comment to moderator  
Reply With Quote
Unread 04/11/19, 11:15 AM  
ChrisK

Forum posts: 0
File comments: 48
Uploads: 0
Love your Add-On! Makes like in ESO so much better!

One request - when used in conjunction with the Perfect Pixel addon - the boxes to enter Chat Scanning codes are not visible/editable.

Anything you can suggest to help?
Report comment to moderator  
Reply With Quote
Unread 04/02/19, 03:24 PM  
Drummerx04
AddOn Author - Click to view AddOns

Forum posts: 37
File comments: 40
Uploads: 5
Re: Minion Keywords

Originally Posted by Hogfinger
Hello!

I don't think there's a way for you to control search keywords for Minion is there? It looks like searches in Minion only yield results based on the add-on name itself.

Whenever I refer to your add-on I say LGM, and people can't find it.

So I just wanted to suggest adding (LGM AI) to the name of the add-on.

Most people refer to auto-inviter add-ons as AI so this would cover both, people searching AI, and LGM.

Thanks for LGM!
That's a fair suggestion, thank you!
Report comment to moderator  
Reply With Quote
Unread 04/02/19, 08:57 AM  
Hogfinger

Forum posts: 0
File comments: 1
Uploads: 0
Lightbulb Minion Keywords

Hello!

I don't think there's a way for you to control search keywords for Minion is there? It looks like searches in Minion only yield results based on the add-on name itself.

Whenever I refer to your add-on I say LGM, and people can't find it.

So I just wanted to suggest adding (LGM AI) to the name of the add-on.

Most people refer to auto-inviter add-ons as AI so this would cover both, people searching AI, and LGM.

Thanks for LGM!
Report comment to moderator  
Reply With Quote
Unread 03/26/19, 05:17 PM  
Drummerx04
AddOn Author - Click to view AddOns

Forum posts: 37
File comments: 40
Uploads: 5
Originally Posted by Supportic
By import I mean when I try to fill out the editbox of my created group, the string, like shown above, will be added like this. Therefore the character will be shown as offline or not known in the list of group members.
It's showing the correct name when the player is already in the group on the first page, but it bugs out when I try to type in the name manually, if that helps.
That actually helps quite a lot since I now know where and why the error exists.

Edit: As a temporary work around, any name that you have in your invite/group list, friend list, or guild rosters can be added to the raid group by right clicking on their name in those lists and choosing "Add to Raid Group" (Mouse 3 should work too)
Last edited by Drummerx04 : 03/26/19 at 05:33 PM.
Report comment to moderator  
Reply With Quote
Unread 03/26/19, 04:25 PM  
Supportic

Forum posts: 24
File comments: 5
Uploads: 0
Originally Posted by Drummerx04
Originally Posted by Supportic
Cannot import names with special characters like: "Käpt'n_Iglo" in the group list.
Will result in "@K☐"
I was curious how long it would take to run into some localization issues.

When you say "import" do you mean the names simply do not display correctly in the lists, or that none of the other features work either?
By import I mean when I try to fill out the editbox of my created group, the string, like shown above, will be added like this. Therefore the character will be shown as offline or not known in the list of group members.
It's showing the correct name when the player is already in the group on the first page, but it bugs out when I try to type in the name manually, if that helps.
Last edited by Supportic : 03/26/19 at 04:25 PM.
Report comment to moderator  
Reply With Quote
Unread 03/26/19, 03:26 PM  
Drummerx04
AddOn Author - Click to view AddOns

Forum posts: 37
File comments: 40
Uploads: 5
Originally Posted by Supportic
Cannot import names with special characters like: "Käpt'n_Iglo" in the group list.
Will result in "@K☐"
I was curious how long it would take to run into some localization issues.

When you say "import" do you mean the names simply do not display correctly in the lists, or that none of the other features work either?
Report comment to moderator  
Reply With Quote
Unread 03/26/19, 12:55 PM  
Supportic

Forum posts: 24
File comments: 5
Uploads: 0
Cannot import names with special characters like: "Käpt'n_Iglo" in the group list.
Will result in "@K☐"
Report comment to moderator  
Reply With Quote
Unread 02/21/19, 07:20 AM  
Drummerx04
AddOn Author - Click to view AddOns

Forum posts: 37
File comments: 40
Uploads: 5
Originally Posted by Coorbin

Perhaps my guild, being an RP guild, is cut from a different cloth than your circles of friends, but getting folks to have the disciple to write exactly the letter or letters asked for in the group solicitation is pretty difficult for us. Folks are used to people manually inviting them, so I constantly see people being like "Can I get a P, please?" instead of just typing "P".

I guess it's a cultural thing, but I absolutely can't live without whole word support (with support for punctuation) or too many people would slip through the cracks. We basically never use multi-character invite strings, so the use case of "ZDD" not matching is less likely, but folks typing "PPPPPP" is very common when they want an invite to the "P" group.
Currently, LGM will catch your "Can I get a P, please?" if you are inviting on "P". I set it up that way because you are right, people often type out things like "p inv pls" and I got tired of manually inviting them. So LGM does scan each chat message looking for that invite string buried within the message. You can also set LGM to search for multiple different invite strings. Punctuation is completely ignored in my search method so " invite ..--%//p---=\=\=\= to group" would be detected as well.

The only thing that I currently do not detect is the repeating singe character, and I already explained why below.

Originally Posted by Coorbin
Several other features of your addon (though, not all of them) are quite interesting to me as an RPer as well, and AutoInvite itself is pretty bare bones. However, there's one feature I want that I don't think either of our addons addresses: I'd like to be able to toggle scanning of specific channels on and off.

Too often I'll type "/ai !p" or something, and get a random person typing "P" in some guild chat I'm not presently interacting with, like a trading guild or something, and they get sent an invite, and I have to apologize, etc.
LGM does support scanning invite strings on specific channels. You can't just "toggle" specific channels, but when setting up the invites, you simply specify which channels you want to search in the first place. You can even specify unique invite strings for each channel simultaneously.
The supported channels are split as follows:
  1. Zone, Yell, Say
  2. Whisper
  3. Guild 1, Officer 1
  4. Guild 2, Officer 2
  5. Guild 3, Officer 3
  6. Guild 4, Officer 4
  7. Guild 5, Officer 5
So if you are interacting with guild 4, you just set LGM to listen on guild 4, and all other chat channels get ignored unless you give them a string to invite on as well.
Report comment to moderator  
Reply With Quote
Unread 02/18/19, 08:02 PM  
Coorbin
AddOn Author - Click to view AddOns

Forum posts: 8
File comments: 8
Uploads: 8
Originally Posted by Drummerx04
Originally Posted by Coorbin
Hi there! In my addon AutoInviteWholeWord, I developed a better way of accurately matching "whole words" of the input strings. Basically, this way can handle punctuation as well. Feel free to adapt it into LGM - which seems on the whole to be better, UI-wise, than AutoInvite, so I would otherwise want to upgrade from AutoInvite to LGM.
Hey Coorbin, thanks for the input! From an end user standpoint, I don't see much benefit in using invite strings that include punctuation, since most groups will just use their Initials or "x" as the invite string.

My design goal was simply to provide an easy way to invite on multiple possible invite strings that are customizable for each major chat channel. If someone wants to be cheeky and type "xxxxxxxXXXXxxxx" instead of "x" then I'm cool with just not inviting them.

Edit: To elaborate a bit more: Your implementation attempts to solve for cheeky people who input extra characters for the invite string. The issue for interpreting user input becomes apparent when your invite string is more than 1 character long (Let's use "ZD").

Code:
"ZD" -> " \0 " -> true -> invite sent
"ZDZDZDZD" -> " \0\0\0\0 " -> true -> invite sent
"ZDD" -> " \0D " -> false -> invite not sent
The best approach when dealing with user input is to define a very narrow set of rules, and then just enforce them. In my case I simply define a valid invite string to be a sequence of characters that matches with (%w+). I also allow multiple invite strings to be specified at once. "inv x invite, rdy/r" (delimiters are optional) would specify 5 invite strings which match any alphanumeric word within chat messages on a specific channel. Now I could instead define invite strings to be all non-whitespace characters with (%S+), but there is no practical reason to do so.
Perhaps my guild, being an RP guild, is cut from a different cloth than your circles of friends, but getting folks to have the disciple to write exactly the letter or letters asked for in the group solicitation is pretty difficult for us. Folks are used to people manually inviting them, so I constantly see people being like "Can I get a P, please?" instead of just typing "P".

I guess it's a cultural thing, but I absolutely can't live without whole word support (with support for punctuation) or too many people would slip through the cracks. We basically never use multi-character invite strings, so the use case of "ZDD" not matching is less likely, but folks typing "PPPPPP" is very common when they want an invite to the "P" group.

Several other features of your addon (though, not all of them) are quite interesting to me as an RPer as well, and AutoInvite itself is pretty bare bones. However, there's one feature I want that I don't think either of our addons addresses: I'd like to be able to toggle scanning of specific channels on and off.

Too often I'll type "/ai !p" or something, and get a random person typing "P" in some guild chat I'm not presently interacting with, like a trading guild or something, and they get sent an invite, and I have to apologize, etc.
Report comment to moderator  
Reply With Quote
Unread 02/11/19, 07:53 AM  
Drummerx04
AddOn Author - Click to view AddOns

Forum posts: 37
File comments: 40
Uploads: 5
Originally Posted by Coorbin
Hi there! In my addon AutoInviteWholeWord, I developed a better way of accurately matching "whole words" of the input strings. Basically, this way can handle punctuation as well. Feel free to adapt it into LGM - which seems on the whole to be better, UI-wise, than AutoInvite, so I would otherwise want to upgrade from AutoInvite to LGM.
Hey Coorbin, thanks for the input! From an end user standpoint, I don't see much benefit in using invite strings that include punctuation, since most groups will just use their Initials or "x" as the invite string.

My design goal was simply to provide an easy way to invite on multiple possible invite strings that are customizable for each major chat channel. If someone wants to be cheeky and type "xxxxxxxXXXXxxxx" instead of "x" then I'm cool with just not inviting them.

Edit: To elaborate a bit more: Your implementation attempts to solve for cheeky people who input extra characters for the invite string. The issue for interpreting user input becomes apparent when your invite string is more than 1 character long (Let's use "ZD").

Code:
"ZD" -> " \0 " -> true -> invite sent
"ZDZDZDZD" -> " \0\0\0\0 " -> true -> invite sent
"ZDD" -> " \0D " -> false -> invite not sent
The best approach when dealing with user input is to define a very narrow set of rules, and then just enforce them. In my case I simply define a valid invite string to be a sequence of characters that matches with (%w+). I also allow multiple invite strings to be specified at once. "inv x invite, rdy/r" (delimiters are optional) would specify 5 invite strings which match any alphanumeric word within chat messages on a specific channel. Now I could instead define invite strings to be all non-whitespace characters with (%S+), but there is no practical reason to do so.
Last edited by Drummerx04 : 02/11/19 at 04:46 PM.
Report comment to moderator  
Reply With Quote
Unread 02/10/19, 11:07 PM  
Coorbin
AddOn Author - Click to view AddOns

Forum posts: 8
File comments: 8
Uploads: 8
Hi there! In my addon AutoInviteWholeWord, I developed a better way of accurately matching "whole words" of the input strings. Basically, this way can handle punctuation as well. Feel free to adapt it into LGM - which seems on the whole to be better, UI-wise, than AutoInvite, so I would otherwise want to upgrade from AutoInvite to LGM.

Code:
local function ai_startsWith(str, start)
   return str:sub(1, #start) == start
end

-- From https://stackoverflow.com/questions/54510033/match-repeatable-string-as-a-whole-word-in-lua-5-1
-- I am ever grateful to the people who worked hard on that problem, especially Egor Skriptunoff!
function ai_containsWholeWord(input, word)
   return (" "..input:gsub(word:gsub("%%", "%%%%"), "\0").." "):find"%s%p*%z+%p*%s" ~= nil
end

function ai_matches(pattern, message)
	message = string.lower(message)
	if ai_startsWith(pattern, "\\!") then
		return message == string.sub(pattern, 2)
	end
	if ai_startsWith(pattern, "!") then
		local tmpWatchStr = string.sub(pattern, 2)
		return message == tmpWatchStr or ai_containsWholeWord(message, tmpWatchStr)
	else
		return message == pattern
	end
end
Report comment to moderator  
Reply With Quote
Unread 01/19/19, 04:56 PM  
varousis

Forum posts: 0
File comments: 20
Uploads: 0
Thank you for your quick reply!
Figured it has something to do with 'in range'....

I really love the special raid group invites. That saves us so much time!
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: