File Utility.lua

Functions

gw.Debug (level, ...) Write a debugging message to the default chat frame with a detail level.
gw.Error (...) Write an error message to the default chat frame.
gw.GetGuildName (target) Get the player's fully-qualified guild name.
gw.GetGuildStatus () Get a string with the player's fully-qualified guild name and numeric rank.
gw.GetPlayerName (target) Get the player's fully-qualified name.
gw.GlobalName (name, realm) Format name for cross-realm addressing.
gw.IsOfficer (target) Check a target player for officer status in the same container guild.
gw.Log (msg) Add a message to the log file
gw.Redact (msg) Print an obfuscated string if the redaction option is set.
gw.WorldChannelFound () Check if player is currently in any world channels.
gw.Write (...) Write a message to the default chat frame.
gw.iCmp (a, b) Case insensitive string comparison.


Functions

gw.Debug (level, ...)
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.
  • ...: A list of the string and arguments for substitution using the syntax of string.format.
gw.Error (...)
Write an error message to the default chat frame.

Parameters:

  • ...: A list of the string and arguments for substitution using the syntax of string.format.
gw.GetGuildName (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.
gw.GetGuildStatus ()
Get a string with the player's fully-qualified guild name and numeric rank.

Return value:

    A string identifier, the empty string if not in a guild.
gw.GetPlayerName (target)
Get the player's fully-qualified name.

Parameters:

  • target:

Return value:

    A qualified player name.
gw.GlobalName (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.
gw.IsOfficer (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 if the target has at least read access to officer chat and officer notes, false otherwise.
gw.Log (msg)
Add a message to the log file

Parameters:

  • msg: A string to write to the log.
gw.Redact (msg)
Print an obfuscated string if the redaction option is set.

Parameters:

  • msg: The input string

Return value:

    The string with redaction applied, if necessary.
gw.WorldChannelFound ()
Check if player is currently in any world channels.

Return value:

    True is the player has joined any world channels, false otherwise.
gw.Write (...)
Write a message to the default chat frame.

Parameters:

  • ...: A list of the string and arguments for substitution using the syntax of string.format.
gw.iCmp (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.

Valid XHTML 1.0!