Limnoria-doc/use/plugins/conditional.rst
2011-10-28 22:49:04 +02:00

3.8 KiB

The Conditional plugin

Numeric comparison

conditional nlt <item1> <item2>

Does a numeric comparison on <item1> and <item2>. Returns true if <item1> is less than <item2>.

conditional nne <item1> <item2>

Does a numeric comparison on <item1> and <item2>. Returns true if they are not equal.

conditional nle <item1> <item2>

Does a numeric comparison on <item1> and <item2>. Returns true if <item1> is less than or equal to <item2>.

conditional nge <item1> <item2>

Does a numeric comparison on <item1> and <item2>. Returns true if <item1> is greater than or equal to <item2>.

conditional nceq <item1> <item2>

Does a numeric comparison on <item1> and <item2>. Returns true if they are equal.

conditional ngt <item1> <item2>

Does a numeric comparison on <item1> and <item2>. Returns true if they <item1> is greater than <item2>.

String comparison

conditional le <item1> <item2>

Does a string comparison on <item1> and <item2>. Returns true if <item1> is less than or equal to <item2>.

conditional ceq <item1> <item2>

Does a string comparison on <item1> and <item2>. Returns true if they are equal.

conditional gt <item1> <item2>

Does a string comparison on <item1> and <item2>. Returns true if <item1> is greater than <item2>.

conditional ge <item1> <item2>

Does a string comparison on <item1> and <item2>. Returns true if <item1> is greater than or equal to <item2>.

conditional ne <item1> <item2>

Does a string comparison on <item1> and <item2>. Returns true if they are not equal.

conditional lt <item1> <item2>

Does a string comparison on <item1> and <item2>. Returns true if <item1> is less than <item2>.

conditional match <item1> <item2>

Determines if <item1> is a substring of <item2>. Returns true if <item1> is contained in <item2>.

Logical operators

conditional cand <cond1> [<cond2> ... <condN>]

Returns true if all conditions supplied evaluate to true.

conditional cxor <cond1> [<cond2> ... <condN>]

Returns true if only one of conditions supplied evaluates to true.

conditional cor <cond1> [<cond2> ... <condN>]

Returns true if any one of conditions supplied evaluates to true.

conditional cif <condition> <ifcommand> <elsecommand>

Runs <ifcommand> if <condition> evaluates to true, runs <elsecommand> if it evaluates to false.

Use other logical operators defined in this plugin and command nesting to your advantage here.

Configuration

supybot.plugins.Conditional.public

Default value: True

Determines whether this plugin is publicly visible.