This addon will make sure that the friends list contains the names of players in the chat channel 'f2ptwink' (the default, but can be changed).

WARNING - If the friends list becomes full the addon will remove all offline characters, unless they have something in their friends notes to make them a permanent friend.

--- Contributors ---

* Yasueh from Twinkinfo.com - Original and present author/project lead.
* Dragonsblood from Twinkinfo.com - Original invite addon code (was updated by Yasueh into an F2PI addon, which is now a part of F2PAddon).



--- To Do --- (unlikely to happen any time soon, as I'm playing GW2)

* try and get the start up working better, so /reload isn't needed almost every time to get the channel list to load into the friends list.  Either get the startup running smoother, or have a scan of the channel list run at regular intervals to pick up changes.
* Get the chat window / channel subscription working better.  Maybe store the windows:channels used by the addon's channels in the DB, so that when channels are switched they are set up for the correct windows.  Would also be needed for additional channels to be used.
* Have the functions handle multiple channels.  They already check for a specific channel, so instead check for the existence of the channel in a list that the addon is handling, and also pass the channel name to the functions so they can handle more than one channel.
* When someone joins the channel , if you're the owner, add their name to a list, turn on the OnUpdate function with a delay of 10s, and when the delay is up have it call a function to check their DB entry for an addon version.  If it's not present / out of date, ban them from the channel.
* Hook any /password /pass commands, and if they contain the channel name, remove the channel entries from the players chat windows (to hide output), send a message to the channel to say that they've attempted to change the password, and have the player leave the channel.  Also have them send an addon message to everyone in the channel, which will trigger a similar function to the above one, that will ban them after their attempt to set a password.
* Pass any status messages that are produced by the addon as addon to addon commands, instead of as text messages, so that the receiving addon can display the message in a localised format for the recipient.
* Add leader function to /f2pq, so that leaders can auto-queue everyone who has set them as leader, in addition to those in their party, block entry to BGs until after they have accepted, and also force everyone to leave queue when they do.
* Save the chat window that is displaying the channel, and save it to the DB, so that when the channel is changed, it still uses the same window.  Make this setting available in the config menu.
* Update localisation to include new additions, and maybe switch to simpler L.["phrase"] format which should be easier to maintain in the code.
* Complete f2pinfo code, allowing info on players that is stored in the database to be shown as a tooltip, when you mouseover their name in the chat.
* Add a command to f2pi to query whether or not a p2p is online who has their invite addon enabled and active.


--- Version History ---

1.2.10b
* 1.2.9 wiped the addon database, but not the friends list.  As friends not in the database couldn't be removed by the addon (because it was checking them to find those who hadn't logged in in ages), this lead to the friends list being stuck full.  Now the addon just wipes all offline friends who don't have notes set, whenever it needs to add someone and there isn't space.
* Attempted to fix issues with the invite functions that were caused by major changes to group/raid functions that came with MoP.  These changes have been tested as far as possible on the PTR, but there may still be issues.
* Deleted a lot of unused code from the addon's files that was commented out.

1.2.9b
* The addon now has a few options available via. [Escape] > Interface > Addons > F2PAddon.
* Slightly modified database structure, to allow more per realm+faction settings, for people who play on several realms.
* The database now stores the version of the addon that created it, allowing the addon to either wipe or modify the database when updated, depending on how big a difference there is between versions.
* Outgoing messages are no longer blocked by level filters, and the option to disable blocking incoming messages from low levels or 24s is in the config menu.
* Tidied up the code a little.

1.2.8
* If you're channel owner, the addon no longer passes to the next most viable owner, every time someone new logs in (left a line of code uncommented).
* Now treats Wintergrasp / Tol Barad the same as BGs or queued dungeons, as far as f2pi is concerned (included Localised names for the other available languages).
* Automatically does a /reloadui if you change to a different channel.

1.2.7
* The /f2pi command now correctly disables all of the F2PI functions, so F2PI won't be automatically closing raids you'd like to form when it should be disabled.
* F2PI now also counts guild members as people not to send warning messages to when they send you whispers.
* The 'raid' command has been removed, because too many were using it when they didn't need to (and keeping me from doing quests ;), and because there's really nothing to do in a raid as an F2P
* Supports localisation.  If you'd like contribute please edit a renamed copy of the f2ploc.enUS.lua file as far as possible and post the new contents as a ticket on the addon's page at curseforge.com.  
* F2PQ entries for a player will now be removed when they leave the channel (log out/DC/whatever), so the /f2pq reset shouldn't be needed any more, unless you want a clear window for your group.
* F2PQ should now work for those with clients that use French, Spanish or German for the interface language.
* The channel that the addon uses for chat can now be changed for just the realm/faction that you are logged into, by using the command '/f2paddon channel newchannelname' (This will also cause the game to leave the currently used channel).  You must give the /reload command to make the addon switch to the new channel, and may need to set one of your chat windows to display text from the new channel.
* Default behaviour for whispers from people who aren't on your friends list is no longer block.

1.2.6
* Now available from curse.com!
* Integrated F2PI into the main addon, and reworked the wording of it's messages to be a bit clearer regarding when to use the 'raid' command.
* F2PI should now disable if a GM whispers you, so they don't get a 'too low level for invites' message from you every time they say something.

1.2.5
* Fixed a couple of issues caused by the WoW 4.3 patch.
* Stopped calling it a beta, because people thought that alone meant there would be bugs.  There are always bugs.  Beta just means I want to find them ;)

1.2.4b
* While the automatic subscribing of chat windows to show the channel may not be reliable down to a Blizzard API function providing unreliable data, the addon will now give a warning if it is receiving messages, but a chat window is not subscribed to show them in. 
* The command '/f2pq reset' will now clear all the names from the F2PQ window before a group queues, in case there are some names already in the list who aren't in your group.  These are caused by people DCing/logging out while queued (sorry, you'll need another macro to go with your '/f2pq' one until I learn a bit more about interface coding).
* Also rejects whispers sent by people who have joined the channel who are levels 1, 2 or 24 (the trolls can be flaming away, but no-one will even see it).
* Fixes the bug in 1.2.3b where dinging 3 or 25 didn't stop people from blocking your chat messsages.  You now send an announcement if you ding those levels, so other players can immediately request your current level from /who (they don't trust that a spammer would tell them their real level).

1.2.3b
* No longer accepts the incompatible data packets sent by the old separate F2PAchi.
* Rejects all chat messages sent by characters under level 3, or at level 24, even if they're on a payed account.  Will inform them that they need to level if they are posting with addon versions from this one on.
BUG: Do not enable your addon/join the channel until level 3, or other players will not see that you have levelled to stop blocking your messages, unless they open their friends list/log out/in to get your current level.

1.2.2b
* Improved the data sending functions:
	Old method:
		Send our data to everyone on the friends list on login.
	New Method:
		Send our data to everyone on the friends list on login.
		Reply with our data if somone has just logged in and sent theirs.

* Data now includes a list of alts (ready for future player info functions)		
* Merged F2PQ into the main addon
* Added version checking
		
1.2.1b
* ChatThrottleLib wasn't included as one of the dependancies for this addon, so could only be found if used in one of your other addons. Fixed.

1.2.0b
* Combined F2PChannelToFriend, F2PChat and F2PAchi with the early version of F2PData, as they all shared several similar functions.  Released for beta testing.