File GreenWall_Core.lua

Functions

GwAbandonChannel (chan) Leave a shared confederation channel and clear current configuration.
GwChannelRoles (chan, name) Finds channel roles for a player.
GwCmdConfig (key, val) Update or display the value of a user configuration variable.
GwCmp (a, b) Case insensitive string comparison.
GwDebug (level, msg) Write a debugging message to the default chat frame with a detail level.
GwDecodeBroadcast (string) Decode a broadcast message.
GwEncodeBroadcast (action, target, arg) Encode a broadcast message.
GwError (msg) Write an error message to the default chat frame.
GwFlushChannel (chan) Drain a channel's message queue.
GwForceReload () Send a configuration reload request to the rest of the confederation.
GwGetGuildInfoConfig (chan) Parse the guild information page to gather configuration information.
GwGetOfficerNoteConfig (chan) Parse the officer note of the guild leader to gather configuration information.
GwGlobalName (name, realm) Format name for cross-realm addressing.
GwGuildName (target) Get the player's fully-qualified guild name.
GwIsConnected (chan) Check if a connection exists to the common chat.
GwIsContainer (guild) Check a guild for membership within the confederation.
GwIsOfficer (target) Check a target player for officer status in the same container guild.
GwIsPeer (guild) Check a guild for peer status.
GwJoinChannel (chan) Join the shared confederation channel.
GwLeaveChannel (chan) Leave a shared confederation channel.
GwLog (msg, level) Add a message to the log file
GwNewChannelTable (name, password) Create a new channel control data structure.
GwPrepComms () Clear confederation configuration and request updated guild roster information from the server.
GwRefreshComms () Parse confederation configuration and connect to the common channel.
GwSendConfederationMsg (chan, type, message, sync) Sends an encoded message to the rest of the confederation on the shared channel.
GwSendContainerMsg (type, message) Sends an encoded message to the rest of the same container on the add-on channel.
GwSetDefaults (soft) Initialize options to default values.
GwStringHash (str) CRC-16-CCITT
GwWrite (msg) Write a message to the default chat frame.


Functions

GwAbandonChannel (chan)
Leave a shared confederation channel and clear current configuration.

Parameters:

  • chan: The channel control table.
GwChannelRoles (chan, name)
Finds channel roles for a player.

Parameters:

  • chan: Control table for the channel.
  • name: Name of the player to check.

Return values:

  1. True if target is the channel owner, false otherwise.
  2. True if target is a channel moderator, false otherwise.
GwCmdConfig (key, val)
Update or display the value of a user configuration variable.

Parameters:

  • key: The name of the variable.
  • val: The variable value.

Return value:

    True if the key matches a variable name, false otherwise.
GwCmp (a, b)
Case insensitive string comparison.

Parameters:

  • a: A string
  • b: A string

Return value:

    True if the strings match in all respects except case, false otherwise.
GwDebug (level, msg)
Write a debugging message to the default chat frame with a detail level. Messages will be filtered with the "/greenwall debug " command.

Parameters:

  • level: A positive integer specifying the debug level to display this under.
  • msg: The message to send.
GwDecodeBroadcast (string)
Decode a broadcast message.

Parameters:

  • string: An encoded string.

Return values:

  1. The action type.
  2. The target of the action (optional).
  3. Additional data (optional).
GwEncodeBroadcast (action, target, arg)
Encode a broadcast message.

Parameters:

  • action: The action type.
  • target: The target of the action (optional).
  • arg: Additional data (optional).

Return value:

    An encoded string.
GwError (msg)
Write an error message to the default chat frame.

Parameters:

  • msg: The error message to send.
GwFlushChannel (chan)
Drain a channel's message queue.

Parameters:

  • chan: Channel control table.

Return value:

    Number of messages flushed.
GwForceReload ()
Send a configuration reload request to the rest of the confederation.
GwGetGuildInfoConfig (chan)
Parse the guild information page to gather configuration information.

Parameters:

  • chan: Channel control table to update.

Return value:

    True if successful, false otherwise.
GwGetOfficerNoteConfig (chan)
Parse the officer note of the guild leader to gather configuration information.

Parameters:

  • chan: Channel control table to update.

Return value:

    True if successful, false otherwise.
GwGlobalName (name, realm)
Format name for cross-realm addressing.

Parameters:

  • name: Character name or guild name.
  • realm: Name of the realm.

Return value:

    A formatted cross-realm address.
GwGuildName (target)
Get the player's fully-qualified guild name.

Parameters:

  • target: (optional) unit ID, default is 'Player'.

Return value:

    A qualified guild name or nil if the player is not in a guild.
GwIsConnected (chan)
Check if a connection exists to the common chat.

Parameters:

  • chan: A channel control table.

Return value:

    True if connected, otherwise false.
GwIsContainer (guild)
Check a guild for membership within the confederation.

Parameters:

  • guild: The name of the guild to check.

Return value:

    True if the target guild is in the confederation, false otherwise.
GwIsOfficer (target)
Check a target player for officer status in the same container guild.

Parameters:

  • target: The name of the player to check.

Return value:

    True is the target has at least read access to officer chat and officer notes, false otherwise.
GwIsPeer (guild)
Check a guild for peer status.

Parameters:

  • guild: The name of the guild to check.

Return value:

    True if the target guild is a peer co-guild, false otherwise.
GwJoinChannel (chan)
Join the shared confederation channel.

Parameters:

  • chan: the channel control block.

Return value:

    True if connection success, false otherwise.
GwLeaveChannel (chan)
Leave a shared confederation channel.

Parameters:

  • chan: The channel control table.
GwLog (msg, level)
Add a message to the log file

Parameters:

  • msg: A string to write to the log.
  • level: (optional) The log level of the message. Defaults to 0.
GwNewChannelTable (name, password)
Create a new channel control data structure.

Parameters:

  • name: The channel name.
  • password: The channel password.

Return value:

    Channel control table.
GwPrepComms ()
Clear confederation configuration and request updated guild roster information from the server.
GwRefreshComms ()
Parse confederation configuration and connect to the common channel.
GwSendConfederationMsg (chan, type, message, sync)
Sends an encoded message to the rest of the confederation on the shared channel.

Parameters:

  • chan: The channel control table.
  • type: The message type. Accepted values are: chat, achievement, broadcast, notice, and request.
  • message: Text of the message.
  • sync: (optional) Boolean specifying whether to suppress queuing of messages. Default is false.
GwSendContainerMsg (type, message)
Sends an encoded message to the rest of the same container on the add-on channel.

Parameters:

  • type: The message type.
  • message: Text of the message.
GwSetDefaults (soft)
Initialize options to default values.

Parameters:

  • soft: If true, set only undefined options to the default values.
GwStringHash (str)
CRC-16-CCITT

Parameters:

  • str: The string to hash.

Return value:

    The CRC hash.
GwWrite (msg)
Write a message to the default chat frame.

Parameters:

  • msg: The message to send.

Valid XHTML 1.0!