.. _plugin-Conditional: Documentation for the Conditional plugin for Supybot ==================================================== Purpose ------- Contains numerous conditional commands (such as 'if', 'and', and 'or'), which can be used on their own or with another plugin. Also provides logic operators for writing conditions. Useful for bot scripting / nested commands. Usage ----- This plugin provides logic operators and other commands that enable you to run commands only if a condition is true. Useful for nested commands and scripting. .. _commands-Conditional: Commands -------- .. _command-conditional-cand: ``cand [ ... ]`` Returns true if all conditions supplied evaluate to true. .. _command-conditional-ceq: ``ceq `` Does a string comparison on and . Returns true if they are equal. .. _command-conditional-cerror: ``cerror `` Runs and returns true if it raises an error; false otherwise. .. _command-conditional-cif: ``cif `` Runs if evaluates to true, runs if it evaluates to false. Use other logical operators defined in this plugin and command nesting to your advantage here. .. _command-conditional-cor: ``cor [ ... ]`` Returns true if any one of conditions supplied evaluates to true. .. _command-conditional-cxor: ``cxor [ ... ]`` Returns true if only one of conditions supplied evaluates to true. .. _command-conditional-ge: ``ge `` Does a string comparison on and . Returns true if is greater than or equal to . .. _command-conditional-gt: ``gt `` Does a string comparison on and . Returns true if is greater than . .. _command-conditional-le: ``le `` Does a string comparison on and . Returns true if is less than or equal to . .. _command-conditional-lt: ``lt `` Does a string comparison on and . Returns true if is less than . .. _command-conditional-match: ``match [--case-insensitive] `` Determines if is a substring of . Returns true if is contained in . Will only match case if --case-insensitive is not given. .. _command-conditional-nceq: ``nceq `` Does a numeric comparison on and . Returns true if they are equal. .. _command-conditional-ne: ``ne `` Does a string comparison on and . Returns true if they are not equal. .. _command-conditional-nge: ``nge `` Does a numeric comparison on and . Returns true if is greater than or equal to . .. _command-conditional-ngt: ``ngt `` Does a numeric comparison on and . Returns true if is greater than . .. _command-conditional-nle: ``nle `` Does a numeric comparison on and . Returns true if is less than or equal to . .. _command-conditional-nlt: ``nlt `` Does a numeric comparison on and . Returns true if is less than . .. _command-conditional-nne: ``nne `` Does a numeric comparison on and . Returns true if they are not equal. .. _conf-Conditional: Configuration ------------- .. _conf-supybot.plugins.Conditional.public: supybot.plugins.Conditional.public This config variable defaults to "True", is not network-specific, and is not channel-specific. Determines whether this plugin is publicly visible.