Sky
From WoWWiki
| Used to be part of the Cosmos distribution. |
Contents |
Last content update was 29 Aug 2006.
As of WoW 1.12, the foundation for inter-addon communication changed drastically. Sky has been discontinued. You may want to look at its successor, Telepathy!
Communications: 1.12 Patch Notes
- There will be a new SendAddonMessage("prefix", "text", "PARTY|RAID|GUILD|BATTLEGROUND") method that transmits a 'hidden' message to the appropriate group of recipients as the normal SendChatMessage would have been.
- Messages will be delivered as a new CHAT_MSG_ADDON event, with arg1 the prefix, arg2 message, arg3 the distribution type ("PARTY","RAID", "GUILD", "BATTLEGROUND"), and arg4 the sender.
- The combined length of message plus prefix can be at most 254 characters. The prefix must not contain a tab character.
- The message will be unaffected by inebriation, but otherwise is subject to normal channel rules (no \n or bad links).
- Messages sent to "RAID" when not in a raid will be delivered as if it had been sent as a "PARTY" message.
- The "BATTLEGROUND" is also be valid as a destination for use with the auto-raid that's formed in battleground.
- Using "RAID" or "PARTY" when not in a party or raid sends no message.
Summary
- Network Chat Communication Library for Mods
- Sky is a communications library designed to make sharing data silently between clients using chat channels much easier. This addon is an embeddable function library. This means that it doesn't have any UI on its own, but rather provides functionality for other addons. If you are an addon user and not an addon developer all you need to do is to leave this addon turned on if you have any other addons that depend on it.
- Sky provides hidden channels ( Sky, SkyGroup and SkyGuild ) which are be automatically updated and referenced by Sky Identities (SKY_CHANNEL, SKY_GROUP and SKY_GUILD ). The Sky Channels provide communication unavailable in the WoW API; for example, you can send a message to a single person or to your entire guild which can be read later, or you can rush an 'alert' to a person or guild.
- Sky Dependancies: Sea, Chronos and Satellite
- Embedded Libs (Standalone vers): SeaHooks, SeaPrint, SeaString, Chronos, and Satellite
- Included in the Cosmos distribution.
What is sky?
Sky is not an AddOn for the user. It is an AddOn that has functions and code that is mainly for programmers. The functionality provided by Sky is used by other AddOns, not by the player. There are several AddOns (for example, PartyQuest, MiniGames, ArcanePartyBars) which can only work and do their job if they are running on several player's WoW, and these AddOns need to pass various information between the players.
Let's take an example. PartyQuest allows you to see the full text and progress of the quests that another player has. In order for this to be possible, PartyQuest has to be turned on and running on both player's WoW. That is not enough however, one player's PartyQuest has to be able to pass information to the other player's PartyQuest. This is where Sky comes in. PartyQuest relies on the Sky AddOn to perform the information passing. Sky, just like PartyQuest, is running on both players' WoW. Whenever PartyQuest wants to talk to its partner copy, it asks Sky to perform the actual dirty work of passing information along.
The reason why Sky is necessary for this is because there are several AddOns that need such information passing. Instead of all of them containing lots of lines of code, all of them with their own solution for passing information, this functionality has been collected to one place, into Sky.
The bottom line is that for you, as a user, Sky adds very little visible effects. However, a number of AddOns that you might want to use make use of Sky.
Written By Legorol http://cosmosui.org/forums/viewtopic.php?p=52654#52654
Features
- Embeddable library
- Works for raids and parties
- Self-determining, unique channel names
- Addons merely needs to register a mailbox and send messages with the Sky API for minimal usage
- Performs basic flood control (used to be messages per minute, now characters per second)
- Message priority system by means of message 'weight'
- Messages are segregated via namespace by Mailbox (or Alert) ID and channel identifier (SKY_CHANNEL, SKY_GROUP, SKY_GUILD, SKY_PLAYER)
- Messages can be sent via channels or whispers (SKY_PLAYER)
- Datagrams are automatically fragmented, queued and reconstructed for multiple message transfer
- Sky.sendTable allows for serialization and direct transfer of lua tables for everything but functions
- Sky messages are automatically forcibly suppressed via a ChatFrame_OnEvent hook (more effective that pre-Sky methods of visibility hiding using the chat API and less invasive than the current multiple hook mayham)
- Sending chat to the Sky channels is dissabled via the normal editbox
- Verbose debug options for seeing hidden chat and diagnosing problems using Sea.io.error (prints to chatframe or optionally ImprovedErrorFrame)
Built-in Slash Commands
- /list # - Short for /chatlist listing of active channels or channel users
- /skyautojoin channelID 1/0 - Allow (1) or Dissallow (0) auto-joining of a Sky Channel (only joined if registered for by an addon). channelID values: SKY_CHANNEL, SKY_GROUP, SKY_GUILD
Quick Start Example
Minimal Required Example
Basic Example of a Sky command:
Sky.registerMailbox(
{
id="MyAddon";
events = { SKY_CHANNEL, SKY_GROUP, SKY_GUILD };
acceptTest = function(e)
Sea.io.printTable(e);
Sea.io.printc({r=0,g=1,b=1}, "Got a message! Event:", e.type);
return true;
end;
}
);
Sky.sendMessage("This whisper is invisible!", "SKY_PLAYER", "MyAddon", "TargetName");
Sky Functions
- Utilities
- activate - Turns Sky online
- deactivate - Turns Sky offline
- isChannelActive - Checks if a channel is available
- isSkyUser - Checks if a user has been seen using Sky
- checkBandwidth - Check status of bandwidth limitations
- flush - Force all timers to go off NOW
- Message Delivery
- sendMessage - Send a text message
- sendAlert - Sends a high priority message
- sendTable - Send a table of data
- Message Receiving
- registerMailbox - Registers a mailbox
- unregisterMailbox - Unregister mailbox
- validateMailbox - Ensures a mailbox is correct
- updateMailbox - Updates the values of a mailbox
- getNextMessage - Retrieves a message from the mailbox queue
- getAllMessages - Retrieves all of the messages for a specific mailbox queue
- emptyMailbox - Empties the mailbox for a specific mailbox ID
- Alert Registrations
- registerAlert - Registers an alert handler
- unregisterAlert - Unregisters an alert handler
- validateAlert - Ensures an alert registrant is correct
- updateAlert - Updates the values of an alert
- User Channel Update Registration
- registerHostess - Registers a hostess
- validateHostess - Ensures a hostess is ok
- updateHostess - Updates the values of a hostess
- unregisterHostess - Unregisters a hostess
- isHostingByID - Checks if hostess exists for the ID
- Slash Command Registration has been Removed from Sky: See Satellite.
Sky Data Types
- SkyMailboxRegistrant - Sky communication registration objects
- SkyAlertRegistrant - Sky communication registration objects
- SkyEnvelope - Envelopes that are left in mailboxes
- SkyDatagram - Datagrams used internally.
- SkyHostess - Updates you when channel events occur
- ChannelIdentifier - A way of denoting a specific or general channel
More information
- Sky Alert IDs - A quick and dirty list of already used SkyAlert IDs
Change log
2.0 to 2.11
- 2.11
- Slightly modified sobriety filter
- Added a 1-sec delay for rejoining channels to avoid 10 channel warning when you're full and the group leader changes.
- 2.10
- Removed SkyChannelManager.isLegalSkyChannel
- Removed SKY_PARTY and SKY_RAID, replaced with SKY_GROUP [not reverse compatible]
- Removed unused SKY_ZONE, use SKY_CHANNEL and transmit zone if you need something similar
- Added auto-join options and addon channel registration
- Removed and changed hooks to be less invasive
- Removed slash command registration (now in the Satellite Addon)
- 2.02
- Fixed toc to work w/o Sea and Chronos externally
- Modified requestChannelList to not break even if your channels are broken.
- 2.01
- Fixed mailboxes to remember ones registered before a newer Sky version is loaded
- 2.0 (Fully Embedable)
- Contains the following embeddable addons:
- Chronos
- SeaHooks
- SeaPrint
- SeaString
- Can be embedded by itself to load all 5 libs
1.0 to 1.9
- 1.9
- Refactored a LOT of code
- Restructured the lib to hopefully be more readable
- Changed a few of the channel functions to allow for a wider variety input formats
- Removed frame xml in favor of a dynamic event driver
- Cleaned up the comment formatting and added comments to describe a lot of functions
- Removed as many globals as possible, hopefully ones unused externally while maintaining backwards compatibility with current code.
- 1.8
- Removed unused printChatList and the unused makeChannelList. Use ListChannelByName and ListChannels.
- Added updateActiveSkyChannels to update the user list of all Sky users from Sky channels, for use mostly after a reloadui when the join messages don't update it automatically
- Fixed temp Join/Leave message silencing
- ListChannelByName now works with any form of channel index, name or sky identifier, useful for silently forcing a userlist update on a specific channel before requesting info. Use sparingly.
- 1.7
- Memory usage optimization: SkyUserList no longer saves across sessions.
- Warning: the user list is not updated after reloadui, you have to call ListChannelByName(SKY_CHANNEL, true) for a silent list to update the channel user list (once for each channel you need a user list for). This is done on log in when each one is joined or changed.
- 1.6
- Changed bandwidth from message cap to character cap, hopefully will avoid dissconnects. At the moment it count all outgoing messages and not just Sky messages. Once the maximum limit has been more solidified I might make it a hard cap, but at the moment it only stops more Sky messages from going out and adds them to the queue.
- Rewrote the event system so that it no longer all happens in the ChatFrame_OnEvent hooks. Those hooks now only stop Sky messages and optionally join/lists from spamming the user.
- German localization updated.
- 1.5
- Standardized SkyParty Name while in raid
- Fixed bug with join/leaving channel too early
- Small code clean up for efficiency.
- Added GuildRecruitment channel support.
- Fixed SkyChannelManager.convertToRealChannelName to work for City Channels
- Fixed Sky.isChannelActive to work with new 1.9 zone channel format (not OOZ)
- Fixed LeaveChannelByName (and /leave)
- Fixed Channel Coloring offset bug.
- Updated an obsolete hook method.
- bugfix for line 262 nil error. Also added a (minor) optimization in isSkySlashCommand.
- Updated recurring functions to use Chronos.scheduleRepeating
- 1.4
- Fixed so that /z is properly registered as triggering the chat SCRIPT function.
- Fixed a minor bug when processing channel lists: names of muted characters in moderated channels are now recognized.
- Updated SkyUserList storage.
- List now stored per realm server.
- Fixed bug where list processing was generating incorrect names in a recent patch.
- Special characters are again correctly remembered
- List now correctly updated when the party changes
- Channel lists are erased and regathered when you rejoin a channel.
- Fixed a bug, where /chatlist /chatwho etc number not always displayed channel list.
- Added Sky.isSlashCommandByID(id) and Sky.isMailboxByID(id) for simplified boolean registration verification.
- User list now correctly parses names with special characters.
- Updated TOC to 1800
- 1.3
- Limitedthe number of messages sky sends to prevent spam disconnects.
- Removed nopatch file since this version is now in sync with the one in Cosmos
- Updated Sky to implement the new Sea subfunction hooks rather than old style aliases.
- Updated TOC to 1700
- 1.2
- Added linebreak protection using Sky messages. All outgoing Sky messages will be replace with '\007' (an unused Bell unicode character) and changed back when received. This curcumvents the normal restriction that causes linebreaks in SendChatMessage to force immediate disconnects. (A problem formerly experienced sending quest texts using PartyQuest).
- Fixed a bug with blank lines in the filter menu.
- 1.1
- Updated TOC to 1500
- Made ChatTypeInfo["CHANNEL"].sticky work correctly
- Updated French and German localizations
- 1.01
- Small 2 line comment fix for list display bug.
- 1.0
- Official Sky Public Release
- Rewrote the SkyUserList code to increase accuracy with system zone channels. The user list is now reset when you join a channel.
- Rewrote /chatlist (channel user listing or channel listing) code to fix some display issues and improve user list auto-parsing onjoin
- (Preferred method is now "/list " to print user list and "/list" to print channel list.)
- Note: Any channels with more than 200 current users will not return any user list.
- Rewrote Join/Leave/Changed msgs to show only in the Default chatframe and the correct number of times and in colors according to their channel
- Fixed bug where slash commands only triggered with a space after them
Beta
- 0.9a
- Stand-alone Sky. Just needs localizations updated (feel free to volenteer)
- Added warnings/block so that you can't join SkyParty/Raid/Guild if you aren't a part of that respective group.
- Fixed leaving SkyParty/Raid/Guild so that it doesn't autojoin a channel for a nonexistent group and then leave it again.
- 0.8a
- Permanently Fixed nil hideJoinLeave Error.
- Updated English localization
- 0.6a
- fixed channel chat while in flight to send to the correct zone
- added /z and /print helpText
- 0.5a
- fixed nil hiddenJoinLeaveAlerts error
- 0.4a
- Fixed nil error when you leave a channel
- Added SkyChannelManager.hideJoinLeaveAlerts and showJoinLeaveAlerts for blocking specific channel alerts.
- General code cleaning
- 0.3a
- Removed yellow join/leave messages and replaced with ones that look like the default messages except they always display in the current chatframe. This is more accurate and definitive but has the side effect of showing you every channel change including the 'bogus' channels used in /reorder.
- Fixed a bug that would break SkyRaid if the person in the first position went offline.
- Added '/print msg' for easy code testing. It just uses a Sea.io.printf to the current frame. It definitely makes my code testing life easier, hope it does yours too. Remember to put quotes around strings.
- 0.2a
- Fixed "/leave #"
- Reactivated Sky channel leave warnings when using /leave
Public test release
- 60% rewrite from the original Sky.
- Extracted optional channel management
- Modified the channel filter menu to exclude sky channels
- Current version only has partial non-English localization
