second return value
m (I played around with this a little bit and this is what I got. :)) |
(second return value) |
||
| Line 2: | Line 2: | ||
Determines if given variable or table is [[secure]] or "[[Tainted (Addons)|tainted]]." Any usage of a "[[Tainted (Addons)|tainted]]" (= non-secure) variable, be it a function or simply data, will break [[secure]] state and prevent further access to Protected functions. | Determines if given variable or table is [[secure]] or "[[Tainted (Addons)|tainted]]." Any usage of a "[[Tainted (Addons)|tainted]]" (= non-secure) variable, be it a function or simply data, will break [[secure]] state and prevent further access to Protected functions. | ||
isSecure, | isSecure, taint = issecurevariable([table], variable) | ||
== | ==Returns== | ||
;isSecure : "boolean" flag: 1 if variable is secure, nil if it is tainted. | |||
: | ;taint : string: addon that tainted the variable (possibly nil if not tainted by an addon). | ||
: | |||
: | |||
==Example 1== | ==Example 1== | ||
| Line 35: | Line 31: | ||
end | end | ||
===Result=== | ===Result=== | ||
*[[API_UnitName|UnitName]] is not a protected Blizzard-defined function, but will still become tainted when hooked. | * [[API_UnitName|UnitName]] is not a protected Blizzard-defined function, but will still become tainted when hooked. | ||
*Message "Given variable tainted. :s" will get displayed in your chat frame. | * Message "Given variable tainted. :s" will get displayed in your chat frame. | ||
==Notes== | ==Notes== | ||